4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Eagle Eye on January 21, 2006, 03:13:16 PM
-
Hello
1) How can we show a tool tip on images, if the user is not logged in, or does not have the required permission (like on V@no’s site ;) )
2) What code should be added to the home page, template, so that if the use is not logged in, we can show a specific message (like login and have fun etc…) and if logged in, then another message....
I know it must have been discussed here in the forum, but I am not able to find it here, please hint me if any,
Thanks
:D
-
No. 1 : It could be done by implementing a JS script from http://www.dynamicdrive.com . ;)
No . 2 : I like this idea. However, it can easily be done by going into your lang/<your_lang>/main.php file and add a new array on top of your "?>" tag. Then, register a new array into your index.php file. Finally, you can use the : {welcome_message} tag on your template/<your_template>/home.html file like this :
{ifno user_loggedin}
{welcome_message}
{endifno user_loggedin}
Note: The {Ifno ...} MOD must be installed. ;)
Note: As a personal alternative solution, I use the Another Simple Publishing News MOD as I have already intergrated a welcome message for GUEST level into the homepage and it works perfectly. ;)
-
1) I'm using http://www.walterzorn.com/tooltip/tooltip_e.htm script, its a very much cross-browser compatible and rediculousy easy to use and install :)
Just add in thumbnail_bit.html template into your <img> tag:{if user_loggedout} onmouseover="return escape('whatever message you want to be showed');"{endif user_loggedout}
2) A little addition to TheOracle answer: you also can use {if user_loggedout} .... {endif user_loggedout} tags without needed installing additional mod.
-
2) A little addition to TheOracle answer: you also can use {if user_loggedout} .... {endif user_loggedout} tags without needed installing additional mod.
Correct.
-
Thanks V@no & TheOracle
got it working fine
:D
-
Just add in thumbnail_bit.html template into your <img> tag:{if user_loggedout} onmouseover="return escape('whatever message you want to be showed');"{endif user_loggedout}
Please excuse me, i did not find any <img> tag in thumbnail_bit.html just {thumbnail} :(
-
ops...its actualy whatever HTML you have around {thumbnail}.
For example I'm using tables, so I added inside <td> tag. You might have <div> so add it inside of it.
-
Coool! :lol: got it working!!!
Actually I am using a 7dana template with the thumbnail column selection on mouse over, so deicide it this way
<td align="center" class="thumb" {if user_loggedin}onmouseover="this.className='thumb2'" onmouseout="this.className='thumb'"{endif user_loggedin}{if user_loggedout} onmouseover="return escape('Please register/login to view this image!');"{endif user_loggedout}>
{thumbnail}<br />
Thanks :D
-
... very nice feature ...
... but the script must insert immediately before the closing </body> tag ...
... and that is the reason of a long loading time of the website in MSIE not in FF ... also of gallery.vano.org ... ! ... :(
... but if all visitors of your websites use FF ... than ok ... :roll:
mawenzi
-
... but the script must insert immediately before the closing </body> tag ...
yes, I put it in footer.html
... an that is the reason of a long loading time of the website in MSIE not in FF ... also of gallery.vano.org ... ! ... :(
Its not caused but this script, its probably by the JS that I use to give PNG alpha transparency support on IE6, which scans the entrire page for .png files..cant wait untill IE7 is finaly out!
-
... Its not caused but this script ...
... but on my testsite and on walterzorn.com itself ...
... it is the different way of MSIE and FF to show a website ... FF begins directly ... MSIE begins after getting all infos ...
... and if such a script lies in the footer, there is a long time of loading the website in MSIE ...
mawenzi
-
hmm...what if you leave only the tags were you are planning to use that javascript on:
////////////// TAGS WITH TOOLTIP FUNCTIONALITY ////////////////////
// List may be extended or shortened:
var tt_tags = new Array("a","area","b","big","caption","center","code","dd","div","dl","dt","em","h1","h2","h3","h4","h5","h6","i","img","input","li","map","ol","p","pre","s", "select", "small","span","strike","strong","sub","sup","table","td","th","tr","tt","u","var","ul","layer");
/////////////////////////////////////////////////////////////////////
In my case I only using it on <TD> tag, so I've replaced it on:var tt_tags = new Array("td");
See if it helps ;)
P.S. would like to see your test site ;)
-
In my case I only using it on <TD> tag, so I've replaced it on: var tt_tags = new Array("td");
See if it helps ;)
Nice tip! anyway i seem to be not having problems in loading time.... and this script is a light one, maybe like V@no said, its due to his other JS scripts..
Thanks guys :D
-
... for using the tooltip only for "No Permission"-Images or "Image-Name / No Permission" / "Image-Name" ...
... you can try this : http://www.4homepages.de/forum/index.php?topic=11270.msg58414#msg58414
@V@no
... after installing the tooltip script this (http://www.thepictureworld.de/) site works also slower ...
... and another slow working site you can find ... here below ...
-
Thanks for the tip Mawenzi. However, this line :
$no_permission = (!empty($show_link)) ? "" : "Für dieses Bild musst du eingeloggt sein !";
should be put under $lang in case other languages modules are installed and, in addition, more users would like to implement this feature. ;)
-
@TheOracle
... it is not a MOD ... it was only a tip for Chicco ( a german user ) ...
... but if you want : please add the $lang to the thread ( for our english speaking users ) ...
... thanks in advance ... :wink:
mawenzi
-
@V@no
... after installing the tooltip script this (http://www.thepictureworld.de/) site works also slower ...
... and another slow working site you can find ... here below ...
I don't know how it was working before, but for me it opens very fast...
-
@ V@no
... also this (http://klick.kl.funpic.de/categories.php?cat_id=19) ... ?
-
Lets see...the front page is almost 200kb (uncompressed, dont check it with FF, it compress pages in the cache and shows the compressed size), with quiet a few javascripts, which possibly could scan entire (200kb!) page for whatever they are supposed to scan (its my speculation on that one) and besides that, you are using some sort of "preloading" script, that shows a message untill all items of the page fully loaded...I guess, if you remove the preloading script, maybe then you'll be able to tell if its slower or not ;)
So, after all that, adding another JS could possibly overload the browser, which would slow down the rendering process...
-
@ V@no
... thanks for your statements and views ...
mawenzi
-
V@no
... after installing the tooltip script this (http://www.thepictureworld.de/) site works also slower ...
... and another slow working site you can find ... here below ...
maybe the site is working slow, due to big tables (lot of information show in so many nested tables- all in one big table), if the tables were separated out then the browser could have processed each table faster... I guess this is the problem... this script works fine :)
-
@maxpaul:
It is doubtful that HTML tables would slow down a site - unless extensive presentation would be involved (but it doesn't seem to be the case here). ;)
It's probably a scripting problem elsewhere on the script.
-
I have thise error:
Parse error: parse error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/olpi/4images/includes/template.php(133) : eval()'d code on line 578
My thumbnail_bit.html is looking at this moment:
<!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new}
<br /> {if user_loggedout} onmouseover="return escape('whatever message you want to be showed');"{endif user_loggedout} {thumbnail}<br />
<a href="{cat_url}">{cat_name}</a><br />
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}<br /><img src="{template_image_url}/{image_rating_round}.gif">
<br>Hits: {lang_hits}{image_hits}</br><p>{if image_is_potm}{lang_potm}{endif image_is_potm}</p>
I have only put in the code. Or musst I do anythink else?
Sorry for my bad english. German is better ;-)
-
Parse error: parse error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/olpi/4images/includes/template.php(133) : eval()'d code on line 578
This error has been covered in the FAQ already. Please visit that section (or use the forum's search engine). ;)
-
Anyone tried this with random images
It wont work for me when I use this code <span{if user_loggedout} onmouseover="return escape('Please register/login to view this image!');"{endif user_loggedout}>{thumbnail}<br /></span>
-
There are two templates for random images, did you add this into both of them? (a link to your site could help too ;))
-
Can't post a link right now (behind proxy/ISA server) :(
But the problem is {if user_loggedout} as soon I remove the tags it works. (But then it shows for all images)
-
In includes/page_header.php find:
"self" => $site_sess->url($self_url),
Insert below: "user_loggedin" => ($user_info['user_level'] == GUEST) ? 0 : 1,
"user_loggedout" => ($user_info['user_level'] == GUEST) ? 1 : 0,
"is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0,
-
WOW.
That worked.
Thank you soo much v@no ;)
Did I miss a FIX ?
-
Did I miss a FIX ?
No, it wasnt discovered till now ;)
-
he okay ;)
Thank You again. You make life worth living again :p
-
This is indeed a nice script.
I want to add it on the detail page . On mouse over the detail image. But I cant find where to add the code.
I guess the actual image link comes with " {image} " in detail.html. How can I add this code there ?? ?
-
To make the tool tip appear on the details page, u need to add the code into templates/<you template>/media/ to the files jpg.html, gif.html etc as per ur requirements....
Best is to add the following code inside the <td> tag just before the {media_src}
U can also add images (like the smiley i added on www.hotdt.com (http://www.hotdt.com)
Here is my code preview in the <td> tag
onmouseover="return escape('<b>:: {image_name} ::</b><br><br> To view 1024x768px wallpaper<br> click on the picture.<br> Please rate this wallpaper! <img src=\'{template_url}/images/login.gif\' width=\'18\'>')"
tip: if u decide to add it to the <td> tag then comment of the others tags in the .js file and just leave: var tt_tags = new Array("td");
if u are interested in the popup function tell me ;)
Hope this was helpful ;)
Regards :D
-
Thanks Max
It really helped me.
if u are interested in the popup function tell me
Which popup?? I always want to get more :D So please share it.
-
at www.hotdt.com (http://www.hotdt.com), on the details image page, when u click on the image, a popup windows comes up, showing the orginal image,
add this javascript to your .js file
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
and in between td tags
<a href="{media_src}" onClick="NewWindow(this.href,'name','1024','768','yes');return false">
enjoy ;)
-
1) I'm using http://www.walterzorn.com/tooltip/tooltip_e.htm script, its a very much cross-browser compatible and rediculousy easy to use and install :)
Just add in thumbnail_bit.html template into your <img> tag:{if user_loggedout} onmouseover="return escape('whatever message you want to be showed');"{endif user_loggedout}
2) A little addition to TheOracle answer: you also can use {if user_loggedout} .... {endif user_loggedout} tags without needed installing additional mod.
Hi there,
i have test this but it doesn´t work :(
I have copy the wz_tooltip.js in my template folder and in my user_logininfo.html i have do this
<img src="templates/4grey2/icons/einstellungen.gif" onmouseover="return escape('whatever message you want to be showed');">
But it has no effect :(
-
I am no expert but try this.
Use
<img src="{template_url}/icons/einstellungen.gif">
and you must insert
<script language="JavaScript" type="text/javascript" src="{template_url}/wz_tooltip.js"></script>
In your footer.html
I assume your wz_tooltip.js in your template folder.
-
I am using this Tool in many times in my site & with success.
Few days back , I tried to use it in jpg.html
My code is like this
<table width="535" height="402" border="0" align="center" cellpadding="0">
<tr>
<td align="center" valign="middle" background="{template_url}/images/lc.gif"><table width="533" height="400" border="0" cellpadding="0">
<tr>
<td><img src="{media_src}" border="1" onmouseover="this.T_TITLE='{image_name}';return escape('To Download Full Screen Wallpaper (1024x768) Use The <b>Download</b> Button Below The Image. </br> By Saving This Image Using Right Click, You Will Not Get The Actual Image')" width="533" height="400"/></td>
</tr>
</table></td>
</tr>
</table>
The thing is, when the mouse moves out of the image, the whole page "Blinks" for a second. (I don’t know what to call it)
But this is happening when I added background image. If I remove that part, it woks just fine.
Is there something wrong in the code? :?
-
did you try insert it into the table and not into the image?
-
did you try insert it into the table and not into the image?
Works perfect now :D
Thanks V@no
-
I am using tool tip txt in jpg.html and it works just perfect.
I want to do something and was wondering if it could be done with this tool tip.
In my site, I have few categories where only registered users can download images. So I was wondering if I can show two different text in jpg.html.
Something like
If download button enable
Show tooltip 1
If download button disable
Show tooltip 2
Would it be possible ? :?:
-
Try to place this tag inside the message quotes in the jpg.html
{if user_loggedout}message for non registered or non loggedin users{endif user_loggedout}{if user_loggedin}message for registered users{endif user_loggedin}
:D
-
Try to place this tag inside the message quotes in the jpg.html
{if user_loggedout}message for non registered or non loggedin users{endif user_loggedout}{if user_loggedin}message for registered users{endif user_loggedin}
:D
I can't find any jpg.html file ?? I am using the standard template and really want a message for people that are not registered to show up when they go to click on a image, but can't get any of these to work.
-
try media folder ;)
-
Hi,
I put the following two lines into categories.html and details.html
<script type="text/javascript" src="./templates/photofront/wz_tooltip.js" language="JavaScript" ></script>
<a href="index.php" onmouseover="return escape('asffsffsfasdf')">Homepage </a>
On both sites the link is displayed but not the tooltip.
thanks for helping me
-
Hi,
I put the following two lines into categories.html and details.html
<script type="text/javascript" src="./templates/photofront/wz_tooltip.js" language="JavaScript" ></script>
<a href="index.php" onmouseover="return escape('asffsffsfasdf')">Homepage </a>
On both sites the link is displayed but not the tooltip.
thanks for helping me
try to put <script type="text/javascript" src="{template_url}/wz_tooltip.js" language="JavaScript" ></script>
in footer.html and it should work fine :wink:
-
Thanks, it works perfect! :D
-
I would like to add the message to main.php like TheOracle mentioned in this tread
I added:
$lang['no_permission_msg']= "Details nur für <B>eingeloggte</B> Mitglieder oder <B>unzureichende</B> Rechte <img src=\'{template_url}/smilies/cool.gif\'>";
to main.php.
I added:
"lang_no_permission_msg" => $lang['no_permission_msg'],
to the part $site_template->register_vars(array( in page_header.php
I added/updated:
$no_permission = (!empty($show_link)) ? "" : "{lang_no_permission_msg}";
in functions.php
The message does not show up when the page is loaded...
When I replace the message in functions.php it works... somehow it's not loaded correctly... :roll:
Any help is appreciated...
Regards
Leh00
I solved it:
To use the code {lang_no_permission_msg} was wrong -> after adding {lang_no_permission_msg} to random_imgage.html and thumbnail_bit.html it works perfect.
-
I tried to add the category description to the tooltip... everthing works fine till I have a link to a image in the description.
Example:
<div onmouseover="return escape('<B>{cat_description}</B>...
and this is what I get out in the browser...
onmouseover="return escape('<B>Cat Text<img src='./../templates/abc/smilies/smile.gif'></B>')
I tried to add the \ to the text in the description like: "Cat Text<img src=\'./../templates/abc/smilies/smile.gif\'> but the "\" are lost -> filtered by the code...
Any ideas?
Regards
Leh00