Support Forums

Plugin - Recently Viewed

This is a discussion on Plugin - Recently Viewed within the Modules / Plugins / Modifications forums, part of the Developer Forums category; v4 Plugin - Recently Viewed The recently viewed plugin will allow you to display a table with the listings a ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 08-27-2007, 11:59 AM   #1
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default Plugin - Recently Viewed

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
Attached Files
File Type: zip recently_viewed.zip (4.2 KB, 123 views)
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules

Last edited by Eric Barnes; 02-22-2008 at 03:01 PM.
Eric Barnes is offline   Reply With Quote
Old 08-27-2007, 05:08 PM   #2
Just get on with it!
 
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 483
Rep Power: 33
michael is just really nice michael is just really nice
Default

Thanks Eric.
__________________
M Michael
V4.2.3 Developer - Sigma Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline   Reply With Quote
Old 02-22-2008, 02:58 PM   #3
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,308
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

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
Attached Files
File Type: zip recently_viewed.zip (4.2 KB, 49 views)
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 02-22-2008, 03:02 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Thanks Mike! I added your zip file to the first post just in case someone misses it.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 07-15-2008, 04:29 AM   #5
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,088
Rep Power: 35
bowers01 is on a distinguished road
Default

Hi,
I have working fine. But on some of my listings the titles are long. It then looks like this http://everythingsfree.org/image//im...ntlyviewed.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
bowers01 is offline   Reply With Quote
Old 07-20-2008, 06:32 AM   #6
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,088
Rep Power: 35
bowers01 is on a distinguished road
Default

How hard would this be to convert into showing other items from this seller?
Any ideas or anyone interested in coding it?
Cheers
bowers01 is offline   Reply With Quote
Old 08-24-2008, 01:12 PM   #7
Member
 
Join Date: Jul 2008
Posts: 35
Rep Power: 13
suav is on a distinguished road
Default

How do I add a header such as "Recently Viewed" to top of this module?
__________________
Running v4.0.8 Dev with the default template.
suav is offline   Reply With Quote
Old 08-24-2008, 05:26 PM   #8
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,088
Rep Power: 35
bowers01 is on a distinguished road
Default

Code:
	<tr>
	  <th colspan="4"><strong>Featured</strong></th>
	</tr>
This will make the blue bar.
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 08-25-2008, 12:33 PM   #9
Member
 
Join Date: Jul 2008
Posts: 35
Rep Power: 13
suav is on a distinguished road
Default

Quote:
Originally Posted by bowers01
Code:
	<tr>
	  <th colspan="4"><strong>Featured</strong></th>
	</tr>
This will make the blue bar.
Nick
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}"?
__________________
Running v4.0.8 Dev with the default template.
suav is offline   Reply With Quote
Old 10-12-2008, 05:59 AM   #10
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,088
Rep Power: 35
bowers01 is on a distinguished road
Default

Hi,
I only just seen the message sorry for the delay.
Add it above {last_viewed number=5 cols=1}
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 12:36 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0