v4 Plugin - Recently Viewed The recently viewed plugin will allow you to display a table with the listings a user has recently viewed. Requirements Minimum version 4.0.0 Instructions Save the code below as function.last_viewed.php and place it in the includes/classes/smarty/plugins/ folder. After you have saved the file you can use this code in the template file: Code: {last_viewed number=5 cols=1} Parameters Below is a list of parameters you can use when calling this plugin. number(integer)The max number of listings you want displayed. cols(integer) This is the number of columns you want to display before a new row is started. table_attr(string) Any table attributes you would like. For example: table_attr='width="100%"'. tr_attr(string) Any tr attributes you would like. show_price(string) Y or N. trailpad(string) A value to pad the trailing cells on last row with (if any) The default is a space or hdir(string) The direction of each row to be rendered. possible values: left (left-to-right), right (right-to-left) the default is right vdir(string) The direction of each column to be rendered. possible values: down (top-to-bottom), up (bottom-to-top) default is down. Code Download
In order to make this as easy and "Idiot" free, I have created a folder with a readme and the compiled code into the correct file name to enable easier use of this module. I hope that this is alright with suzkaw, if not I'm sure he'll remove this post. Cheers, -Mike
Hi, I have working fine. But on some of my listings the titles are long. It then looks like this http://everythingsfree.org/image//images/151333recentlyviewed.jpg and as you can see stretches the table making it look very bad. Is there a way to make it only use the first say 10 digits then just put ... at the end? Cheers
How hard would this be to convert into showing other items from this seller? Any ideas or anyone interested in coding it? Cheers
Its not working for me and I feel like an idiot for asking dumb questions but in which files do I insert this code into? Is it in the file "function.last_viewed.php" or above the code "{last_viewed number=5 cols=1}"?
Hi, I only just seen the message sorry for the delay. Add it above {last_viewed number=5 cols=1} Nick
Mine does not show anything. How does this work? It seems like it retrieves an array of listing IDs from $_GET['view']. But, how does $_GET['view'] get populated? I must have mess something up in my viewlisting.php.
It's probably a silly question, however have you actually viewed any ads since adding the module? If you haven't then it can't show any that were just viewed, because... um... there aren't any. -Mike
After I added the smarty plugin on the front page, I opened several ads. But, the Recently Viewed area remains empty. Does this need the user to be logged-in to work?
But if the user is not signed in which ads will be displayed by this plugin? Those that have been viewed by random users? Why would an individual member be interested in that? If the plugin displayed ads that I as a user had recently viewed it may jog me into action to actually contact the seller.
Going off memory here but the module sets a cookie when you view a listing and that is what is used to pull out the ones you recently viewed.
Is this plugin compatible with V4.1.3? I know that the plugin folder has moved for one thing . . . Michael