vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Profile Enhancements - Homepage Thumbnail Preview in Member's Profile (https://vborg.vbsupport.ru/showthread.php?t=178530)

veenuisthebest 05-07-2008 10:00 PM

Homepage Thumbnail Preview in Member's Profile
 
******************veenuisthebest******************
*****************Visit Tech6.com****************

Homepage Thumbnail Preview in Member's Profile

Difficulty: Very Easy


Q. What does it do ??

A. If a user fills in the Homepage field, a linked thumbnail preview is generated and replaced by his Homepage text link.

Q. Do I need this ??

A. Yes.

Q. Does it work in different browsers ??

A. Tested in IE, Firefox and Chrome. Works perfect !!


Template Edit: 1
Member Info Templates/memberinfo_block_contactinfo

PLEASE NOTE:- This is not actually a product but a service by www.shrinktheweb.com. You must register before using this as they provide you with a unique key ID that you have to enter in the code below. Its worth registering !! Its 100% free. As they say, the thumbnails are refreshed monthly.

Begins here:-

1. First register at www.shrinktheweb.com and note Your Access Key ID from STW lobby.

2. Open memberinfo_block_contactinfo template:-

Find and delete this:-

Code:

<if condition="$prepared['homepage']">
    <dt class="shade">$vbphrase[home_page]</dt>
        <dd><a href="$prepared[homepage]" target="_blank">$prepared[homepage]</a></dd>
    </if>



Then find this:-

Code:

<dl class="list_no_decoration" id="additional_contact_details">



And add above:-


Code:

<!-- Homepage preview begins here -->
<if condition="$prepared['homepage']">
    <fieldset>
<legend>$vbphrase[home_page] of $prepared[username] (<a href="$prepared[homepage]" target="_blank">$prepared[homepage]</a>)</legend>
<div class="fieldset_padding floatcontainer">
<ul class="list_no_decoration">
<li><a href="$prepared[homepage]" target="_blank"><img src="http://www.shrinktheweb.com/xino.php?embed=1&amp;STWAccessKeyId=Your Access Key ID&amp;Size=lg&amp;stwUrl=$prepared[homepage]" width="175" height="125" align="left" border="0" style="border: 3px double #e3e3e3" alt="$prepared[username]'s Homepage" /></a></li>
</ul></div></fieldset>
    </if>
<!-- /Homepage -->


You'll have to enter Your Access Key ID within the IMG tag in the above code.


You may edit the above code according to your requirements like setting the width, height, border color, Size=lg for large and sm for small.


Hope you like this sweet little mod, very simple but really useful and cool. I am sure, you are definitely going to use this.. ;)

Pleaseee MARK AS INSTALLED if you find it useful !!

Critical Changes in 1.5:-
1. XHTML valid now.
2. STW has announced changes in URL parameters that would be mandatory soon:-
u -> stwu
Url -> stwUrl

Change in 1.6:-
1. You do not need "Your Secret Access Key" in the URL anymore. It will work with/without it, but removing it is preferred, as now it makes sense of it being "secret". SO, just &amp;stwu=Secret Key has been removed from the code.


Source: http://tech6.com/f51/homepage-thumbn...-profile-t587/

************************************************** *************************
************************************************** *************************

ShawneyJ 05-08-2008 01:27 PM

hey this could be good thanks ;)

veenuisthebest 05-08-2008 01:28 PM

oh yess.. it is.. i hope you like it sir !!

Defkalion 05-08-2008 02:03 PM

Thanks it's interesting addon. Works ok. :)

veenuisthebest 05-08-2008 02:05 PM

oh yess.. thumbnail queue process would happen for just a minute or two and only once for a particular website!!!!

as the images then get cached onto their server !!

veenuisthebest 05-08-2008 02:06 PM

just check it after few minutes.. and should be done !!

PoetJA-1975 05-08-2008 02:39 PM

Nice and should be able to be applied to 3.6.8 PL2 as well
Thanx for the sharing!

Jacquii.

veenuisthebest 05-08-2008 04:03 PM

Quote:

Originally Posted by PoetJA-1975 (Post 1512729)
Nice and should be able to be applied to 3.6.8 PL2 as well
Thanx for the sharing!

Jacquii.

yess.. its just a minor template edit !! would work in every version of vB..

Hoffi 05-08-2008 04:59 PM

Nice. Tagged fpr later.

bugzy 05-08-2008 05:30 PM

Works great

unitedpunjab 05-08-2008 07:57 PM

You can use this and won't need to register anywhere,

Code:

<if condition="$prepared['homepage']">
    <fieldset>
<legend>$vbphrase[home_page] of $prepared[username] (<a href="$prepared[homepage]" target="_blank">$prepared[homepage]</a>)</legend>
<div class="fieldset_padding floatcontainer">
<ul class="list_no_decoration">
<a href="$prepared[homepage]" target="_blank"><img src="http://open.thumbshots.org/image.pxf?url=$prepared[homepage]" width="120" height="90" align="left" border="0" style="border: 3px double #e3e3e3" alt="$prepared[username]'s Homepage" /></a>
</ul></div></fieldset>
    </if>


veenuisthebest 05-08-2008 08:34 PM

Quote:

Originally Posted by unitedpunjab (Post 1513030)
You can use this and won't need to register anywhere,

Code:

<if condition="$prepared['homepage']">
    <fieldset>
<legend>$vbphrase[home_page] of $prepared[username] (<a href="$prepared[homepage]" target="_blank">$prepared[homepage]</a>)</legend>
<div class="fieldset_padding floatcontainer">
<ul class="list_no_decoration">
<a href="$prepared[homepage]" target="_blank"><img src="http://open.thumbshots.org/image.pxf?url=$prepared[homepage]" width="120" height="90" align="left" border="0" style="border: 3px double #e3e3e3" alt="$prepared[username]'s Homepage" /></a>
</ul></div></fieldset>
    </if>


this has already been posted here, thanks anyway
But the service of thumbshots.org is lacking in the following way:-
  • They are lacking in browser compatibility as discussed here.
  • I have just applied your thumbshots.org code on my testboard, and its over 15 minutes, my thumbnail isn't updated its still showing this. Shrinktheweb.com takes not more than 1-2 minutes for thumbnail generation:-
  • I find shrinktheweb.com's service to be better than the two after checking/testing them both.

unitedpunjab 05-09-2008 12:22 AM

Switched to Shrinktheweb.com and Iagree it is indeed a better service,Thanks Vinayak :up:

veenuisthebest 05-09-2008 01:08 AM

glad to know you liked it unitedpunjab !! :)

dancue 05-09-2008 02:50 AM

Image quality on STW is also better than thumbshots.org.

Thanks for the code!

Hornstar 05-09-2008 08:58 PM

Does look very good, but does this have any problems with members that enter in their homepage without the http:// or without the www etc. because i've seen past ones do some funny things when they leave out that.

veenuisthebest 05-09-2008 09:15 PM

this one's got no problem sir and by the way.. this problem has nothing to do with this mod, homepage field is handled/validated by vB and not by this mod.
  • Have checked just now with/without http:// , no problem occurs.
  • However, if a user does not write WWW, vB doesn't save the URL..
SOO, no chances of problems !! :)

and plzzzzz, do not forget to mark as installed !!!

Big Boss 05-10-2008 01:18 PM

Not bad at all.

BWJ 05-10-2008 09:35 PM

Super nice!

It works perfectly... but do you know what to with the following. Example:

www.domain.com/website

Some users have their website as a subpage for another domain which is not their own. What is showed is the thumbnail for www.domain.com

veenuisthebest 05-10-2008 11:48 PM

well... this works for domains and sub-domains only like:-

edit: problem fixed

BWJ 05-11-2008 12:02 AM

ok - thank you. Super nice anyway... :)

veenuisthebest 05-11-2008 12:52 AM

Hey BWZ, found a solution for your problem !!...

Replace the <a href>.... </a> tag with this:-

Code:

<a href="$prepared[homepage]" target="_blank"><img src="http://www.shrinktheweb.com/xino.php?embed=1&u=Your Secret Access Key&STWAccessKeyId=Your Access Key ID&inside=1&Size=lg&Url=$prepared[homepage]" width="175" height="125" align="left" border="0" style="border: 3px double #e3e3e3" alt="$prepared[username]'s Homepage" /></a>
Notice the &inside=1 before &Size=lg. This should solve your problem.. :)

dancue 05-11-2008 01:23 AM

I just noticed that it was updated today. what changes took place?

veenuisthebest 05-11-2008 01:27 AM

Quote:

Originally Posted by dancue (Post 1515476)
I just noticed that it was updated today. what changes took place?

please see above.. version updated !!

BWJ 05-11-2008 01:28 AM

Quote:

Originally Posted by veenuisthebest (Post 1515460)
Hey BWZ, found a solution for your problem !!...

Replace the <a href>.... </a> tag with this:-

Code:

<a href="$prepared[homepage]" target="_blank"><img src="http://www.shrinktheweb.com/xino.php?embed=1&u=Your Secret Access Key&STWAccessKeyId=Your Access Key ID&inside=1&Size=lg&Url=$prepared[homepage]" width="175" height="125" align="left" border="0" style="border: 3px double #e3e3e3" alt="$prepared[username]'s Homepage" /></a>
Notice the &inside=1 before &Size=lg. This should solve your problem.. :)

You are a genius! Nominated... oh I already did that before your improvement... :p

veenuisthebest 05-11-2008 01:32 AM

glad you liked it BWJ !! and thanks for pointing out this problem.. I did not thought of it !! ;)

veenuisthebest 05-12-2008 02:46 PM

if in any case.. you face some troubles like getting error messages saying Thumbnail Queued for a long time, simply remove $inside=1 from the img tag.

KURTZ 05-12-2008 03:14 PM

you can also use the SNAP SHOTS ;)

veenuisthebest 05-12-2008 03:38 PM

SNAP SHOTS is quite different from STW..

It displays a preview of the URL on mouse hover whereas STW embeds the preview image of the URL.

Both the services are unique !! and too good !... :up:

veenuisthebest 05-12-2008 09:20 PM

IMPORTANT NOTE:-

okayyy.... so I just got to know.. that $inside=1 that enables capturing screens of inside URL's like http://www.domain.com/website/ OR http://www.domain.com/website/file.html is a Pro feature BUT is currently free till June 5th, 2008 after which you'll have to remove $inside=1 as it won't work anymore from then onwards for free.

This means that URL's to DOMAINS/SUBDOMAINS would work fine and will remain free forever.

dancue 05-12-2008 09:26 PM

What is the cost?

veenuisthebest 05-12-2008 09:31 PM

you may check it here

dancue 05-12-2008 09:36 PM

According to that it's free. Up to 250K requests per month.

veenuisthebest 05-12-2008 09:46 PM

yes... it is.. but not the INSIDE URL's feature ($inside=1)

This is the quote from the email I received from CEO of STW:-

Quote:

&inside=1 IS NOT a part of the FREE service and will not work for free when we go live on June 5th. However, the service will still be free for anyone using your mod that doesn?t have &inside=1 in the request. In other words, the specific ?inside? page option is a PRO feature and requires an upgrade. Between now and June 5th, however, it will work for free. ;)

Thanks,


Brandon Elliott
CEO
I hope I am clear now..

UPDATE:-

I have reverted the mod. back to 1.00
Only $inside=1 is removed from the IMG tag.

dancue 05-12-2008 09:54 PM

Okay. Thank you. That chart is not laid out properly.

dancue 05-16-2008 04:32 PM

I'd like to make a suggestion.

Any way to have a popup dialog box ask the user if they'd like to submit their link into the links directory as well? Pressing yes would take them to the submit a link page on vbadvanced links directory.

It would be really nice if the fields were already filled in based on what they filled out in the usercp.

TCB 05-19-2008 05:59 PM

a fantastic addon. Thanks a lot :D

Parabellum 05-27-2008 12:49 AM

Thank you works great! :up:

Would it be possible to integrate this into the member list? I would like to show a thumbnail image of the URL instead of the WWW button.

Thanks again

veenuisthebest 05-27-2008 01:52 AM

won't be tough .. just requiring a simple edit of the memberlist_resultsbit template

find this:-
Code:

<a href="$userinfo[homepage]" target="_blank"><img src="$stylevar[imgdir_button]/home.gif" alt="home.gif" title="<phrase 1="$userinfo[username]">$vbphrase[visit_xs_homepage]</phrase>"  border="0" /></a>
and replace with the code here making some necessary changes.. you may try doing this in your test board first coz it would require a bit of HTML/design editing to match the layout.

callumbush 05-27-2008 08:35 PM

I've installed this but the website image says "invalid credentials"?

"Your Secret Access Key" - I used the long code it gave me.
"Your Access Key ID" - I used my username

What have I done wrong? :S


All times are GMT. The time now is 05:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01441 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete