• Uncategorized

    Cuando era joven

    When you bring down a criminal organization, its not unlike bringing down a popular corporation. There are negative consequences that cause massive hemmoraging damage to the surrounding market. Imagine bringing down a successful national icon, like McDonald’s or Microsoft. It’s not like a company going out of business because business was bad. We are taking them out at the height of their success.

    The winds were strong but not enough to say it was gusting. Just to say, we weren’t going to rely on any flying object to hit the mark. It was dark and cold. The solar eclipse had caused some of our equipment to go haywire – but we really didn’t need our Blackberrys here.

    I don’t know, maybe I was taking this thing too personal, but had this hate that burned and churned in my chest. Treason, if I could call it that – not against our country, but against our team. An insider was working against us on this mission, and that made it difficult for me to execute certain actions. It was actually making some team members doubt the mission… doubt ME. When I jump out in to harm’s way, I cannot have my wingman doubting me and me doubting him.

    Song-Ze said, “To deceive one’s enemies, one must deceive thy friends”… or something close to that. But in the midst of deceptions, who remembers the truth anymore?

  • Uncategorized

    Adding a logout button to admin [by celiawessen]

    osCommerce:: Adding a logout button to admin
    In the admin/includes/languages/english.php and japanese.php files, add:


    In the admin/includes/header.php file find:

    <td class="headerBarContent" align="right">

    <?php echo '<a href="http://www.oscommerce.com" class="headerLink">' 

    HEADER_TITLE_SUPPORT_SITE '</a> &nbsp;|&nbsp; <a href="' 

    tep_catalog_href_link() . '" class="headerLink">' 

    HEADER_TITLE_ONLINE_CATALOG '</a> &nbsp;|&nbsp; <a href="' 

    tep_href_link(FILENAME_DEFAULT'''NONSSL') . '" class="headerLink">' 

    HEADER_TITLE_ADMINISTRATION '</a>'?>&nbsp;&nbsp;</td>

    and replace with:

    <td class="headerBarContent" align="right">

    <?php echo '<a href="http://www.oscommerce.com" class="headerLink">' 

    HEADER_TITLE_SUPPORT_SITE '</a> &nbsp;|&nbsp; <a href="' 

    tep_catalog_href_link() . '" class="headerLink">' 

    HEADER_TITLE_ONLINE_CATALOG '</a> &nbsp;|&nbsp; <a href="' 

    tep_href_link(FILENAME_DEFAULT'''NONSSL') . '" class="headerLink">' 

    HEADER_TITLE_ADMINISTRATION '</a> &nbsp;|&nbsp; <a href="' 

    tep_href_link(basename($PHP_SELF), '''NONSSL') . '?execute_logout_user=1" class="headerLink">' 

    HEADER_TITLE_LOGOUT '</a>'?>&nbsp;&nbsp;</td>

  • Uncategorized

    Sort by model number in Admin [by celiawessen]

    osCommerce:: Sort by model number in Admin
    To sort by model number (products_model_id) in the admin module, first of all, you need to call the products_model_id field from the database table.

    Around line 880, you'll find the following code:

    tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, 

    p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " 
    TABLE_PRODUCTS " p, " 


    pd.products_id and pd.language_id = '" 
    $languages_id "' and p.products_id = p2c.products_id and p2c.categories_id = '" $current_category_id "' order 

    by pd.products_name"

    and replace it with:

    tep_db_query("select p.products_id, p.products_model, pd.products_name, p.products_quantity, 

    p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from 


    TABLE_PRODUCTS_TO_CATEGORIES " p2c where p.products_id = pd.products_id and pd.language_id = '" $languages_id "' and p.products_id 

    = p2c.products_id and p2c.categories_id = '" 
    $current_category_id "' order by p.products_model"); // Sort by model

    The above code adds p.products_model in the query string, plus at the end denotes order by p.products_model. This way, the list gets order by the model number instead of the name.

    If you cannot find the original piece of code, your might have other contribs already installed. You can look for the $products_query = string cuz that is not going to change.

  • Uncategorized

    Using PHP+MySQL on Mac OS X 10.4.5 workstation [by celiawessen]

    PHP and MySQL:: Using PHP+MySQL on Mac OS X 10.4.5 workstation
    If you're like the thousands of geeks out there that installed MySQL on the workstation version of Mac OS X, then you might encounter this problem once you upgrade your software.

    If you are having problems with the database connection between PHP 4.4.x and MySQL 5.0.x there's a problem that would have never arised with the Server version of OS X.

    mysqld creates a socket file called "mysql.sock" when it starts up. PHP needs this file to connect ot the databases. Somewhere between 5.0.0 and 5.0.11, the location of where the socket file is created has changed from /tmp/mysql.sock to /var/mysql/mysql.sock.

    PHP versions prior to 4.4.x thinks the socket file lives in the /tmp/ directory , but newer versions of PHP looks for the file in /var/mysql. So you'll need to edit the php.ini file to look for the socket in the correct place.

    So startup mysqld, and look for the mysql.sock file in both places, then edit the php.ini file accordingly.


    .default_socket = /tmp/mysql.sock


    mysql.default_socket = /var/mysql/mysql.sock

    Remember to restart Apache via GUI or apachectl for the change to take effect.