PDA


View Full Version : Custom coded thumbnails...


theMusicMan
03-23-2005, 05:37 PM
Hi All

I have been working steadily on the CMPS Links system to tailor it more to my site, and though there are many things I yet want to do, the very first thing I did was to incorporate a system of thumbnail images/screenshots into the system which I feel greatly enhances the visual appeal of the links system (might be something for a future release Brian??)

First I added a Custom Field to the links system where a user can enter the URL of a 100*100 thumbnail image (any image format) of the front page of their www site.

I then modified the View Link Details CMPS template code such that this custom field is displayed as an image if there is a URL entered in the field, and alternative text is displayed in it if not. The image has been coded to show alt text of the Link Title and also acts as a dynamic link to the submitted link www site which will open in a new window if cliucked upon.

Then I wanted the thumbnails to appear whenever a user was browsing any of the links categories... latest links, new links etc. This involved ammending the browselinks.php code to bring the custom field record from the database, and then ammending the relevant templates to display the thumbnail image in the left column on any browsed page.

This is still a manual process where the user has to enter the url of a submitted image themselves, or they can request that I do this for them, but it works well I think.

Feel free to have a browse and let me know what you think...

www.themouthpiece.com/links (http://www.themouthpiece.com/links)

Special thanks must go to Brian and Colin_F who were very helpful to me in getting this sorted.

Ta

bassnutz
03-23-2005, 08:31 PM
That's a very nice touch. I was admiring your set up last night. How could I obtain such a beauty for my board?

KW802
03-23-2005, 08:58 PM
Am I the only one not seeing any links? :confused:

theMusicMan
03-24-2005, 02:40 AM
BassNutz: Many thanks... I got this done by Miko over at vBStyles... and I also use CMPS available here...

KW802: The link images show either when viewing the Link Details or when viewing any of the links in browse mode... i.e. when at the Links Home there are a few Newest 5 Links of which I think 3 have images... scroll down to see those. Then when you click on http://www.themouthpiece.com/links/browselinks.php?do=newlinks you should also see the images to the left. Yeah...?

KW802
03-24-2005, 11:47 AM
John, do you have permissions for guests turned off? I can see the categories but when they all show "Never" as the last updated date with 0 links and 0 replies. Going into any of the categories results in a "No Links to Display" message. :(

Nordinho
03-24-2005, 12:43 PM
John, do you have permissions for guests turned off? I can see the categories but when they all show "Never" as the last updated date with 0 links and 0 replies. Going into any of the categories results in a "No Links to Display" message. :(

Same here...

but I would love to know how you pulled it off...

bassnutz
03-24-2005, 01:16 PM
BassNutz: Many thanks... I got this done by Miko over at vBStyles... and I also use CMPS available here...

Yes, the style is nice. But I was asking about the hack for the thumbnails in the links directory. :)

Lionel
03-24-2005, 02:11 PM
can't see them either..

theMusicMan
03-24-2005, 04:16 PM
Sorry all... I have now enabled links for guests... very sorry. Thanks for looking - hopefully you will have another go now that I have done this...

Lionel
03-24-2005, 04:19 PM
ah. I did the same for my site :-). Have 3 kinds of images... the ones from thumb.org, the ones for no images and the ones for listings without links...

KW802
03-24-2005, 04:19 PM
John, looks good! Your solution solves a need for the people who wanted something like the DMOZ hack but without having to rely upon DMOZ. :cool:

idslamyou
04-04-2005, 12:10 AM
Can anyone provide specific instructions to perform this hack?

Also, is there a way for a user to actually upload an image and use it as the thumbnail when they are submitting the link?

kersti
02-05-2006, 12:47 PM
Was there ever an answer to this?

theMusicMan
02-05-2006, 01:42 PM
Yup... this is what it looks like after I coded it for my style...

http://www.themouthpiece.com/links/browselinks.php?do=newlinks&styleid=29

Rock3
05-17-2006, 06:18 PM
yes, but people are asking HOW you got thumbnails.

theMusicMan
05-17-2006, 06:30 PM
I took a screenshot, saved the file, pointed to it in a custom field, used that custom field in a css div to display the thumbnail with a nice border.

How's that.

Rock3
05-20-2006, 12:22 PM
perfect

dbarry
08-21-2006, 11:22 PM
Can you post the code?????

ladybeth
09-01-2006, 02:52 PM
Can you post the code?????
I guess not. :)

rolando
09-06-2006, 12:20 PM
It would be nice is someone posted the code, the hack, isn't this what this part of the forum is? "Hacks & Modifications" Thanks, rg.

kersti
09-22-2006, 06:43 PM
Yes it would be nice, instead of just saying "I did this" - feel like reporting this thread!

Spikeman
10-11-2006, 12:34 AM
code is here http://www.vbadvanced.com/forum/showthread.php?t=7527

and the search button is in the navbar ;)

kall
10-11-2006, 02:05 AM
What's up with the moderators on your site tMM?

I see: di , 1 , d , 3 , 2.

d, has member.php?u=d as its Profile URL.. which doesn't (obviously) work.