Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Tuesday, September 17, 2013

How to find all your missing or broken images in Virtuemart

If your store has changed servers or you are just having some file backup issues and are missing your images here is a quick script to tell you which images are broken in virtuemart. This php script could easily be modified for other websites, stores, or tables.

Just change a few variables, upload and it will list out all of your missing product photos. Even with an edit link to help you fix them faster!


 /**
Joomla 1.5 - virtuemart 1.9
lists product large images that are missing and need to be re-uploaded
Thumbnails are auto generated so its not an issue to look for them.
could be easily modified for other datbases/content i.e. categories

*/

//database variables - copy from your configuration.php
$user = '';
$db = '';
$password = '';
$host = 'localhost';
$editurl ='https://www.DOMAIN.com/administrator/index.php?page=product.product_form&limitstart=0&keyword=&product_parent_id=&option=com_virtuemart&product_id=';
 
//make sure you edit your full path here 
$filepath ='/home/DOMAIN/public_html/components/com_virtuemart/shop_image/product';

echo "file location:".$filepath."<br><br>";

if (!$link = mysql_connect($host, $user, $password)) {
    echo 'Could not connect to mysql';
    exit;
}

if (!mysql_select_db($db, $link)) {
    echo 'Could not select database';
    exit;
}
//database query for the fields we need
$sql    = 'SELECT product_id,product_full_image, product_name FROM jos_vm_product';
$result = mysql_query($sql, $link);

if (!$result) {
    echo "DB Error, could not query the database\n";
    echo 'MySQL Error: ' . mysql_error();
    exit;
}

while ($row = mysql_fetch_assoc($result)) 
{
    $filename = $filepath.'/'.$row['product_full_image']; 
    //output the file name and edit link if the file is missing  
    if(!file_exists($filename))
    { 
        echo $row['product_full_image']. ' - '.$row['product_name']  ;
        echo  ' <a href="'.$editurl.$row['product_id'] .'" target="_blank">edit</a><br>';
    }
}

mysql_free_result($result);
exit();
 


Stumble Upon CodePyro

Thursday, January 24, 2013

Fedex 2 Day Shipping always costs $11.83 issue

Discovered a really bothersome issue with fedex, for random zip codes all over the US it returns the same shipping rate of $11.83 for  FEDEX_2_DAY shipping. These zip codes were talking about random places like South Dakota, Colorado, Arizona to name a few.

If you have Fedex shipping, you may want to start watching the calculations on the 2 Day shipping. I am still not totally convinced that its not only just an issue with this particular fedex production account. I have sent support a request, and will update this post with the findings.

To confirm that the issue was not just code in joomla/virtuemart I downloaded and setup the Fedex example api code and ran tests with versions 9,10, & 13 all in production.


Here is the link to the Fedex Developer resources and api
https://www.fedex.com/wpor/web/jsp/drclinks.jsp?links=wss/getstarted.html

There is a link on this page for the "Web Services Developer Guide" but its really hard to see/find due to its styling, so here is that link too.


Stumble Upon CodePyro

Thursday, April 05, 2012

PHP simple Paypal IPN

To setup a quick Paypal IPN

This quicky uses the code from
http://code.google.com/p/paypal-ipn-class-php/

Download code; unzip; place in site;

Next create your Paypal Button form. Make sure it Posts to paypal.php.
Use paypal.php?sandbox=1 to test in the sandbox

<form action="paypal.php?sandbox=1" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="PAYPAL EMAIL ADDRESS">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Stuff">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="2.99">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1"> 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


Next make sure you change the 2 settings for the emails and ADD the line for the SMTP server



 define('EMAIL_ADD', 'PAYPALEMAIL'); // For system notification.
 define('PAYPAL_EMAIL_ADD', 'PAYPALEMAIL');
ini_set("SMTP", "mail.MAILSERVER.com");


Then down on line 96ish add the fields from your specific form to look like
$p->add_field('business', PAYPAL_EMAIL_ADD); //don't need add this item. if your set the $p -> paypal_mail.
            $p->add_field('return', $this_script.'?action=success');
            $p->add_field('cancel_return', $this_script.'?action=cancel');
            $p->add_field('notify_url', $this_script.'?action=ipn');
            $p->add_field('item_name', $_POST['item_name']);
            $p->add_field('item_number', $_POST['item_number']);
            $p->add_field('lc', $_POST['lc']);
            $p->add_field('amount', $_POST['amount']);
            $p->add_field('cmd', '_xclick');
            $p->add_field('rm', '2');    // Return method = POST
 


Stumble Upon CodePyro

Friday, January 27, 2012

vbulletin error after upgrading php "includes/init.php Line: 49"

If you are getting the below errors with vBulletin after upgrading php.



Deprecated: Assigning the return value of new by reference is deprecated in E:\websites\dynamic\DOMAIN\a2hosting_forum\includes\init.php on line 383

Deprecated: Assigning the return value of new by reference is deprecated in E:\websites\dynamic\DOMAIN\a2hosting_forum\includes\class_core.php on line 2529

Unable to add cookies, header already sent.
File: E:\websites\dynamic\DOMAIN\a2hosting_forum\includes\init.php
Line: 49


To fix
Try replacing

error_reporting(E_ALL & ~E_NOTICE);

with

error_reporting(E_ALL & ~E_NOTICE & ~8192);


Then replace all occurances of '=&' with '='


Stumble Upon CodePyro

Monday, July 25, 2011

Debugging Titanium xhr requests with php

Authentication for xhr request for Appcelerator Titanium is difficult. During my latest bout with the cross platform mobile app platform I discovered that XHR request header variable names get renamed (aka case changes).

For the auth part of the app being worked on requires sending a Session Key for authorization for every request after the user is logged in. For a good tutorial on how a more basic authorization might work go check out Titanium User Authentication. In any case request headers sent from Titanium are re-cased i.e. "UserAuthKey" becomes "Userauthkey".

To discover this lil gem of a problem after hours of poking I chose to find and use a logging utility to see what was actually being sent.

Below is a quick php POST logging utility from CodeWord with headers added. This logging utility serializes the incoming Post request to a logs directory. It makes it easy to see the variables being passed in and headers.

To use, create a php file called xhrlog.php. Upload to your favorite testing server. Ensure you have a directory called "logs". Then submit your xhr POST requests to MYDOMAIN.com/xhrlog.php from php, html, android, titanium.. wherever and it'll log it for you!

<?php

 
  /*function from http://blog.apokalyptik.com/2008/03/25/logging-post-data/comment-page-1/
Creates a log file of the POST request
*/ 
if ( isset($_POST) && is_array($_POST) && count($_POST) > 0 ) {
  $log_dir = dirname( __FILE__ ) . '/logs/';
  $log_name = "posts-" . $_SERVER['REMOTE_ADDR'] . "-" . date("Y-m-d-H") . ".log";
  $log_entry = gmdate('r') . "\t" .serialize(parseRequestHeaders())."\n ". $_SERVER['REQUEST_URI'] . "\r\n" . serialize($_POST) . "\r\n\r\n";
  $fp=fopen( $log_dir . $log_name, 'a' );
  fputs($fp, $log_entry);
  fclose($fp); }
   
/*
function copied from stackoverflow http://stackoverflow.com/questions/541430/how-do-i-read-any-request-header-in-php

Parses html request headers
*/
  function parseRequestHeaders() {
    $headers = array();
    foreach($_SERVER as $key => $value) {
        if (substr($key, 0, 5) <> 'HTTP_') {
            continue;
        }
        $header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));
        $headers[$header] = $value;
    }
    return $headers;
}

?>



Stumble Upon CodePyro

Thursday, June 02, 2011

php Image Magik - how to force Text Wap without cropping

After several hours of trying to find the best way to add 2 sets of text to an image using ImageMagik without overlapping. The image is split into two natural text blocks. I felt it was easier to add the two sections of text to the one image instead of combining two images.

The simplest way I could find is to figure out the font point size and approximate the dimensions by the number of characters in your string. Then use the php wordwrap function to add newline characters every 35 characters.

Note: I only needed to force word wrapping on message one because it shows on the left side of the image. ImageMagik will automatically wrap the annotation if it runs into the right edge of the image. Well it appears that way and its working so far, but I may change it later just cause :)

//force text wrapping every 35 characters
$message = wordwrap($message, 35, "\n", true);
$filepath = '/home/test.com/';
$newfile = $filepath.'uploads/files/'.$newfilename;
//image we want to write text on
$blankfile = $filepath.'images/blank_image.png';

$imageCMD = "convert  '$blankfile'    ".
                 " -fill '#000000' -pointsize 16   -annotate +40+80 '$message1'   ".  
                 " -fill '#000000' -pointsize 20   -annotate +340+150 '$message2' ".
                 " '$newfile'" ;
//calls the linux commandline to process the command    
$cr = system( $imageCMD  , $retval);



Stumble Upon CodePyro

Tuesday, May 17, 2011

Customize the Joomla offline login redirect url

First off to customize the offline login form for joomla change the "Site Offline" to yes in the Global Configuration-> site tab.

Once you make this change the website will require a login to view the site. To customize this page copy the offline.php file to templates/YOURTEMPLATE folder. Then feel free to add your graphics, tweak the css and heck even add some animation from jquery or perhaps a slideshow.

For my project I needed to have a splash html page before the website login. This causes issues because the index.html page is loaded as the 'URL/' inestead of the index.php. Basically when someone logged in they would be redirected to the splash page. Well heck that ain't gonna work...

So to resolve the issue you need to find the line in the offline.php file that has the base64_encode(JURI::base()). Replace the JURI::base() with the url you need to redirect to i.e. base64_encode('http://YOURDOMAIN.com/about')


Stumble Upon CodePyro

Tuesday, May 10, 2011

Joomla website offline login issue on IIS with sh404sef

QUICK how to fix sh404sef on IIS - just in case
1. open up webroot\components\com_sh404sef\shPageRewrite.php
2. Find and replace every instance of #__sh404SEF so it matches your db table. The default is lower case #__sh404sef. OMG WTF! it works on Linux and Apache, why not windows????

Venting and Explanations
Horray! another 3 hours learning about sh404sef. This time a site needed to use the joomla website offline login form. This particular site is hosted on win IIS over at Outstanda hosting, they actually had really responsive tech support which was nice.

Support was needed to figure out how to modify folder permissions in their control panel. For reference you have to change it in the FTP manager from the control panel.

As soon as the website offline was enabled the website was throwing a "service temporarily unavailable" which is INCREDIBLY annoying to figure out, esp because this server would not output error messages. I manually stepped through the files tracing it to the shPageRewrite.php file to the first line for the db call.


Stumble Upon CodePyro

Tuesday, April 12, 2011

Sidebar Generator plugin for Wordpress 3.1 issues resolved

Hello all of you out there frustrated with the Zero response to the issues with the Sidebar Generator. I had a word press site that used this plugin and after upgrading it no longer worked or appeared to.

After playing with the plugin and testing it after the 3.1 upgrade is related to the saving the post. It turns out that the database table wp_postmeta was getting populated with a JSON string of php output

SELECT * FROM `wp_postmeta` where meta_value like '%<?=$i?>%'

<select name="sidebar_generator[<?=$i?>]">

Just replace the lines with this one
<select name="sidebar_generator_replacement[<?php echo $i; ?>]">

Link to updated plugin working on Wordpress 3.1.0


Stumble Upon CodePyro

Wednesday, March 02, 2011

CSVI virtuemart google base export Tax's changes

Google base import has changed their tax format for product import, to implement these changes in Virtuemart CSVI export you need to make some code changes.

  1. Change the Default fields in the google base export
    1. Change the custom field g:tax_region to g:tax and give it your required values semi-colon separated in the format of (Country:Region:Rate) i.e. "US:Colorado:5.00"
  2. Remove the custom field g:tax_percent

around line 113 in csvi_class_xml_froogle.php in the file
administrator/com_csviimproved/helpers/xml
add the following case to the function ContentText


case 'g:tax':
                        list($country, $service, $rate) = split(":", $content);
                        $this->contents = '
                        <g:country>'.$country.'</g:country>
                        <g:region>'.$service.'</g:region>
                        <g:rate>'.$rate.'</g:rate>
                        <g:tax_ship>n</g:tax_ship>
                        ';
                    break;


Stumble Upon CodePyro

Monday, December 20, 2010

virtuemart: Enable Billing information in Order Review page

Quick script to paste into the virtuemart checkout confirmation page to show the billing information under the shipping info.

Step 1:
Search for "if(NO_SHIPTO=='')" in your components/com_virutemart/themes/YOURTHEME/templates/checkout/get_final_confirmation.tpl.php

Step 2:
and find the last line that reads
echo "</td></tr>";


Step 3:
Just after that last line paste the below contents.

$db->query("SELECT * FROM #__{vm}_user_info WHERE user_id=".strip_tags($db->f("user_id"))." and address_type='BT'");
    $db->next_record();
 
    
    echo '<tr><td valign="top"><strong>'.$VM_LANG->_('PHPSHOP_ORDER_PRINT_CUST_BILLING_LBL') . ":</strong></td>";
    echo '<td>';
    echo vmFormatAddress( array('name' => $db->f("first_name")." ".$db->f("last_name"),
                                        'address_1' => $db->f("address_1"),
                                        'address_2' => $db->f("address_2"),
                                        'state' => $db->f("state"),
                                        'zip' => $db->f("zip"),
                                        'city' => $db->f("city"),
                                        'country' => $db->f('country')
                                    ), true );
    
    echo "</td></tr>";



Stumble Upon CodePyro

Friday, August 06, 2010

Zipcodes to go radius search MySQL table

Recently I have finished a customized zip radius search and used the one from Zipcodes to go. Unfortunately they only have csv, xls, and mdb formats for the database. To make use of their data you need to import it into mysql, but first you must create the table which phpmyadmin won't do automagically (please tell me im wrong by the way).

First you must create the table.

I tried to be as lazy as possible and tried to export the mdb to mssql then to mysql but it didn't really work and took waayy too long so i ended up having to write out the create table anyway.


SQL to create the gold table
Note: Remove the ID field until after you import all the data from the csv, otherwise the field lengths wont match!

CREATE TABLE IF NOT EXISTS `zipcodes_full` (
 `ID` int(12) unsigned NOT NULL AUTO_INCREMENT,
 `ZIP_CODE` varchar(255) NOT NULL DEFAULT '' ,
 `CITY_NAME` varchar(255) NOT NULL DEFAULT '' ,
 `STATE_NAME` varchar(255) NOT NULL DEFAULT '' ,
 `STATE_ABBREV` varchar(255) NOT NULL DEFAULT '' ,
 `STATE_FIPS` varchar(255) NOT NULL DEFAULT '' ,
 `COUNTY_FIPS` varchar(255) NOT NULL DEFAULT '' ,
 `COUNTY_NAME` varchar(255) NOT NULL DEFAULT '' ,
 `TOTAL_COUNTY_POPULATION` varchar(255) NOT NULL DEFAULT '' ,
 `TOTAL_COUNTY_HOUSING_UNITS` varchar(255) NOT NULL DEFAULT '' ,
 `LATITUDE` varchar(255) NOT NULL DEFAULT '' ,
 `LONGITUDE` varchar(255) NOT NULL DEFAULT '' ,
 `TIMEZONE` varchar(255) NOT NULL DEFAULT '' ,
 `DAYLIGHT_SAVINGS` varchar(255) NOT NULL DEFAULT '' ,
 `Returns` varchar(255) NOT NULL DEFAULT '' ,
 `$ AVG AGI` varchar(255) NOT NULL DEFAULT '' ,
 `Refunds` varchar(255) NOT NULL DEFAULT '' ,
 `$ AVG Refund` varchar(255) NOT NULL DEFAULT '' ,
 `Single` varchar(255) NOT NULL DEFAULT '' ,
 `Married Joint` varchar(255) NOT NULL DEFAULT '' ,
 `Head of Household` varchar(255) NOT NULL DEFAULT '' ,
 `<30` varchar(255) NOT NULL DEFAULT '' ,
 `30_44` varchar(255) NOT NULL DEFAULT '' ,
 `45_60` varchar(255) NOT NULL DEFAULT '' ,
 `>60` varchar(255) NOT NULL DEFAULT '' ,
 `TV_Designated Market Areas` varchar(255) NOT NULL DEFAULT '' ,
   PRIMARY KEY (`id`)
)  


Second:

Importing the data is a freaking pain through phpmyadmin. I ended up using the commandline on my local machine and now i am trying to use BigDump php to migrate it to the server.

Use the below script in the mysql commandline to import the csv into the db table. It worked wonderfully 4.6 some seconds. Great Now how do i get it to the server....

Note i dont have mysql mapped in my environment variables in windows so i needed to copy the csv file into the mysql bin directory.

load data local infile '5-DIGIT-ZIP-GOLD.csv' into table zipcodes_full fields terminated by ','  ENCLOSED BY '"' LINES TERMINATED BY '\r\n'


Stumble Upon CodePyro

Tuesday, April 06, 2010

FedEx Handling fee as a percent in virtuemart

If your like me, and every client needs something special and different. One of my latest e-commerce stores used FedEx for shipping. Great, no problem its an easy setup in Virtuemart. Their FedEx account gives them special pricing for the online shipping calculator, which they need to add 40% too. Virtuemart doesn't allow you to add a percent only a set integer amount.

The handling fee variable in virtuemart is setup only to add a base amount to the shipping cost. We needed to add 40% to each shipping amount.

This is a change specifically for FedEx, but the other shippers should be similar.

Change the handling fee in the FedEx preferences to 0.40.

components/com_virtuemart/classes/shipping/fedex.php: around line 206
change & add the lines below.

//add the percent or set amount 
if(FEDEX_HANDLINGFEE < 1)
     $charge =$rate_Ret['1419-'.$i]+ $rate_Ret['1419-'.$i] * floatval( FEDEX_HANDLINGFEE );
    else
     $charge = $rate_Ret['1419-'.$i] + floatval( FEDEX_HANDLINGFEE );


Stumble Upon CodePyro

Tuesday, March 16, 2010

User Port: upgrades

Been working with the userport extension for joomla and importing 2500 users for a site. This import utility is amazing and saves a ton of time GO GET IT!

I ran into a "feature" that I needed. That feature is to generate random passwords for users on update; when the password field is missing. It also needed to email the new password to the users.

Note: you normally don't want to do this because the import utility automatically loads all the users. Therefore you could accidentally change all your users passwords so be careful.

I chose to modify the userport utility because, well lets face it I'm lazy and making code changes is infinitely more fun than deleting and re-importing records yuk.

Zipped version of the full change for a "quick fix". Oh and it belongs in the folder "administrator\components\com_userport\admin.userport.php"

//change #1 around line 80
//added the userlog to the email body; the userlog contains the new email
'{email_body}' => $params->get( 'message_body_when_notifying_existing_user', JText::_( 'DEFAULT_MESSAGE_BODY_WHEN_NOTIFYING_EXISTING_USER' ) ).
implode( "\n- ", $userLog )


//change #2 around line 228
//create random password on update
else if((bool)$params->get( 'overwrite_password_of_existing_user', false ) == true)
{

$userData->password  = JUserHelper::genRandomPassword( 12 );
//add the password to the userlog so it can be emailed
$userLog[] = JText::sprintf( 'INFO_PASSWORD_UPDATED', $userData->password );
if((bool)$params->get( 'given_passwords_are_already_encoded', false ) == true )
$userData->password = JUserHelper::getCryptedPassword( $userData->password);

$user->password = $userData->password;

}


Also fixed a couple of variable warnings caused by missing quotes
//line 446
$title .= JText::_( 'FORM_ADDED_NEW_USERS' ).' ';
//line 450 
$title .= JText::_( 'FORM_UPDATED_EXISTING_USERS').' ';
//line 466
HTML_userport::userportPrintConfiguration( $option, $task, JText::_( 'FORM_CONFIGURATION' ) );
HTML_userport::userportLog( $option, $task, JText::_( 'FORM_RETRIEVED_USERS' ).' '.JText::_( 'FORM_LOG' ), $log );
HTML_userport::userportExport( $option, $task, JText::_( 'FORM_USER_LIST' ), $csvExportString );




I wanted to post this to the project on the project page http://joomlacode.org/gf/project/userport/, or forums but couldn't find a good place on joomlacode.org. Let me know if there is a place for it, i would like to help the community and submit this for the project.


Stumble Upon CodePyro

Wednesday, March 10, 2010

Importing Categories/Products/Sub items with Virtuemart CSVI

Finally after much trial/error/re-dos I finally have a grasp on correctly importing into virtuemart with the CSVI tool. Here is a run down to hopefully make it easier for you aka "me" later.

Note 1: Export your data from your existing store
The default in the CSVI is Carots ^ for field delimiters and tilde ~ to wrap text content.


Step 1:
Go into the CSVI templates and make a template that you can match your data too. Become familiar with the field listings . I ended up using category_path, category_list_order, category_full_image, category_description, category_publish, category_products_per_row, category_flypage.

Category_path -> use this field to setup your structure of parents and children

Make sure your images don't have a path i.e. 'someimg.jpg' not 'images/someimg.jpg' and are copied into the /components/com_virtuemart/shop_image/category/ folder.

Import the categories, then go into virtuemart category list and verify everything is correct

Note 2: make sure your categories are correct!! Every time you re-import your categories it will make new ones instead of overwriting the old ones which also screws up the products linked to the correct category. //BOO!!
Product import will update/overwrite existing products! //YEA!!


Step 2: Prep/import your products.
You need a csv import of products that will be listed under categories/sub-cats. These products will be added directly to your category structure using the category_path field. The Category_id didn't work for me so use the category_path instead. It will be something like 'Computers/hardware'.

Again the images don't need a path and need to be uploaded into /components/com_virtuemart/shop_image/products/

Step 2: Prep/import your sub-products.
Setup a product import with a blank CATEGORY_PATH and have the product_parent_sku setup. This field will need to have the EXACT product_sku of the parent product item.

Note 3: Products with a category path will be listed under the category NOT under the parent product.

Note 4: the product_currency field MUST BE UPPER case i.e. 'USD' otherwise it formats your prices to something random (I didn't bother trying to figure it out it probably uses EUR or something).

Note 5: When importing users, the users must be imported into joomla first then imported into virtuemart


Stumble Upon CodePyro

Wednesday, February 24, 2010

virtuemart addtocart_list_single.tpl.php on line 38

If you are getting an attributes error in virtuemart with child products on line 38. Just open the file and add an if isset to the attributes around the foreach statement.

likea-so


if(isset($product['attrib_value']))
{
foreach($product['attrib_value'] as $attribute) { ?>
<span class="vmChildDetail<?php echo $cls_suffix ?>" style="width :<?php echo $attrib_width ?>;" />
<?php echo " ".$attribute ?></span>
<?php
}
}


Stumble Upon CodePyro

Thursday, December 17, 2009

Joomla jxListFiles with Pagination

Heres a quick upgrade to the jxListFiles Joomla module to setup pagination.

Just replace the /mod_jxlistfiles/tmpl/default.php with this code

<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); 
require_once(  JPATH_ROOT.DS.'/libraries/joomla/html/pagination.php' );    
$pageLimit  = JRequest::getVar('limit', 10, '', 'int');
$pageStart  = JRequest::getVar('limitstart', 0, '', 'int');

$pageNav = new JPagination( count($filelist), $pageStart, $pageLimit);
$genCounter=1;

?>

<ul class="jxfilelist">
<?php foreach($filelist as $file): ?>
<?php $genCounter++; 
if($genCounter >= $pageStart && $genCounter<=($pageStart+$pageLimit)): ?>
<?php if ($params->get('linkfiles') == 'yes'): ?>
<li class="<?php echo $file->class; ?>"><a href="<?php echo $params->get('url') . '/' . $file->filepath; ?>"><?php echo $file->filename; ?></a></li>
<?php else: ?>
<li class="<?php echo $file->class; ?>"><?php echo $file->filename; ?></li>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</ul>

<form id="pagination" method="post">
<?php echo $pageNav->getListFooter(  ); //Displays a nice footer  ?>
</form>


Stumble Upon CodePyro

Monday, October 05, 2009

joomla mod_placehere fix error on line 122

Joomla mod_placehere error

Notice: Undefined property: stdClass::$groups in \components\com_content\helpers\icon.php on line 123

you can fix this error by changing line 122


if(!isset($article->groups)) to

if(isset($article->groups))

The Not IsSet then using the variable was causing the error.


Stumble Upon CodePyro