4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: trez on January 25, 2006, 05:16:48 PM
-
MOD WORKS ONLY ON 1.7.1! - NO SUPPORT FOR NEWER VERSIONS OF 4IMAGES!
Info:
I've searched the whole forum about any related topic, yes there are, but no working ones (for me), one is in spanish, the other is making errors, so i worked a little bit and (with the help of V@no) combine some stuff to get a working "Hor or Not" MOD. There were many requests for such a MOD, so here it is.
The MOD:
User opens detailed version of an image, instead of the rating button, he sees radio-buttons from 1 to 5 (or more if you change the rating) above the image. After clicking on a radio-button, the rating is added to the database and he will be automaticly redirected to the next image in the category (folder), if there is one.
Demo:
official version: www.hotornot.com (http://www.hotornot.com)
4images: www.zapomnime.com (http://www.zapomnime.com/index.php) *user name "test", password "test"*
Required MODs
http://www.4homepages.de/forum/index.php?topic=7493.0 (http://www.4homepages.de/forum/index.php?topic=7493.0)
Changed files:
/templates/rate_form.html
/templates/details.html
/details.php
Tested on 4images 1.7.1 with Firefox & IE
--------------------------------------------------------------------------------------------------------------------------------------------------------
1.
open details.php
find:
show_image($image_row, $mode, 0, 1);
move below:
unset($next_prev_cache);
save file
2.
open details.html
find:
{image}
replace with:
{if next_image_url}<a href="{next_image_url}">{endif next_image_url}
{if_rate_form} {rate_form} {end_if_rate_form} {image}
{if next_image_url}</a>{endif next_image_url}
{lang_image_rating}: {image_rating} ({image_votes} {lang_votes})<img src="{template_url}/images/{rating_pic}" alt="" />
Add "<img src="{template_url}/images/{rating_pic}" alt="" />" only if you've installed Nicky's "Star Rating MOD" http://www.4homepages.de/forum/index.php?topic=923.msg3990#msg3990 (http://www.4homepages.de/forum/index.php?topic=923.msg3990#msg3990) If not, delete it.
find:
{if rate_form}
<div align="center">{rate_form}</div>
{endif rate_form}
delete it, or leave it if you want a second rate form under the image.
save file
3.
open rate_form.html
find:
<form method="post" action="{self}">
There are two ways for the next step:
a)
if you applyed fix [1.7.1] Conditional tags inside other conditional tags + {ifno ...}{endifno ...} http://www.4homepages.de/forum/index.php?topic=7493.0 (http://www.4homepages.de/forum/index.php?topic=7493.0)
replace with:
<FORM action={if next_image_url}{next_image_url}{endif next_image_url}{ifno next_image_url}{self}{endifno next_image_url} method=post target=_top>
b)
If you haven't applied that fix
replace with:
<FORM action={if next_image_url}{next_image_url}&{endif next_image_url}{self} method=post target=_top>
find:
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="head1">
<table border="0" cellspacing="0" cellpadding="3" class="row1">
<tr>
<td valign="bottom">
<select name="rating" class="select">
<option value="">--</option>
<option value="5">5</option>
<option value="4">4</option>
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
</select>
</td>
<td>
<input type="hidden" name="action" value="rateimage" />
<input type="hidden" name="id" value="{image_id}" />
<input type="submit" value="{rate}" class="button" name="submit" />
</td>
</tr>
</table>
</td>
</tr>
</table>
replace with:
<TABLE borderColor=#000000 cellSpacing=0 cellPadding=0 width=450>
<TBODY>
<TR vAlign=top>
<TD align=top width="440"> <TABLE borderColor=#000000 cellSpacing=0 cellPadding=1 width="100%" class="head2">
<TBODY>
<TR vAlign=top>
<TD align=middle> <TABLE width=445 border=0>
<TBODY>
<TR>
<TD align=middle colSpan=3 width="445"> <b>Vote!</b></font></TD>
</TR>
<TR>
<TD width="62"></TD>
<TD align=middle width="319"> <table border="0" cellspacing="1" width="100%">
<tr>
<td align="center">1</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td><input onclick=submit() type="radio" value="1" name="rating" ></td>
<td><input onclick=submit() type="radio" value="2" name="rating"></td>
<td><input onclick=submit() type="radio" value="3" name="rating"></td>
<td><input onclick=submit() type="radio" value="4" name="rating"></td>
<td><input onclick=submit() type="radio" value="5" name="rating"></td>
</tr>
</table></TD>
<TD width="29"></TD>
</TR>
<TR>
<TD width="62"><FONT color=#006699 size=2><B>NOT</B></FONT></TD>
<TD align=middle width="319"> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<center><img src="{template_url}/images/hotornotback.gif" border="0" alt="" /></center>
</TBODY>
</TABLE></TD>
<TD width="29"><FONT color=#cc3300 size=2><B>HOT</B></FONT></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<input type="hidden" name="action" value="rateimage">
<input type="hidden" name="id" value="{image_id}">
Thats just a sample html, you have to change some details if youre using an other template or want (f.e.) a smaller box etc. Also you have to change the words "Vote!", "Hot" and "Not" above to whatever you like. If you want to have more voting options (e.g. 1 - 10) check this topic http://www.4homepages.de/forum/index.php?topic=6674.0 (http://www.4homepages.de/forum/index.php?topic=6674.0)
save file
upload the "hotornotback.gif" into your template/.../images folder. You can make one on you own in Photoshop, or just use this (for a 1 - 12 rating system):
(http://www.zapomnime.com/templates/default/images/hotornotback.gif)
Your done! Thanks a lot to V@no (who wrote the redirect function) and to Lavazza (Yes coffee is important when you code) :lol:
-
The day has come. 8)
Finally, all there's left is to put these results within the user's profile. :D
-
Finally, all there's left is to put these results within the user's profile. :D
You mean something like - User Profile -> show pictures submitted by user with rating OR User Profile -> Show best rated images etc?
Dont understand :D
PS: 36 hits on my page from this forum since posting that topic, 5 mails Sp, please allow me to answer you before you write me:
NO, i'am not translating that page into english, and YES, we have the most beautyfull women here in Bulgaria (Russia too ;) ) :D :D
-
User Profile -> show pictures submitted by user with rating
Right. This one. Sorry for the mis-information. ;)
and YES, we have the most beautyfull women here in Bulgaria (Russia too Wink )
Well, isn't that interesting ? ! :mrgreen:
-
Right. This one. Sorry for the mis-information. ;)
Its allready done if the user installs the star rating MOD, the "show pictures submitted by user" MOD, and puts the rating stars into the thumbnail_bit :)
Well, isn't that interesting ? ! :mrgreen:
:lol: :lol:
-
Good point. How about this one ?
Show best rated images etc?
;)
-
Good point. How about this one ?
Show best rated images etc?
;)
Hm, of course, i'am a PHP newbie, but i think when we modify the MOD that shows the top-images in the actual category. EG: insted of "xxx.com/4images/top.php?cat_id=1" "xxx.com/4images/top.php?user_id=1" But i still don't figured out how to modify the code in the php files - thats something you understand much better ;)
-
А я что то не найду в details.php этой строки:
show_image($image_row, $mode, 0, 1);
-
comes this mod with "show rates in top images"?
-
comes this mod with "show rates in top images"?
Add "<img src="{template_url}/images/{rating_pic}" alt="" />" only if you've installed Nicky's "Star Rating MOD" http://www.4homepages.de/forum/index.php?topic=923.msg3990#msg3990 If not, delete it.
[/i]
-
А я что то не найду в details.php этой строки:
show_image($image_row, $mode, 0, 1);
Пробуйте найти show_image($image_row, $mode, 0, 1);
В противном случае возможно ты устанавливал МОД, который изменился, та линия (спроси V@no)
-
show_image($image_row, $mode, 0, 1);
I can't find this line. I looked at the script and again. I just can't find it. Can someone help me where can find this line somewhere?
Thanks in advance.
-
I can't find this line. I looked at the script and again. I just can't find it. Can someone help me where can find this line somewhere?
Line 68 in details.php (from the original package). ;)
-
thanks, It's working fine.
-
He always says i have to complete my topic and comment field?!
he doesn't get my vote :( what to do?
-
He always says i have to complete my topic and comment field?!
he doesn't get my vote Sad what to do?
More details would really be amended here ... your question is too shrinked up ... how can we help you if you're not posting with details ? ;)
-
After i click on a number (1-5) the site refreshes and and shows above the hot-not frame that i should fill the topic/heading and comment fields with text.
-
Screenshots ?
-
After i click on a number (1-5) the site refreshes and and shows above the hot-not frame that i should fill the topic/heading and comment fields with text.
That wouldnt happend with a fresh 4images code...You should remmember that every change you made to the code could possible break other mods...this seems to be the case...
Start digging in details.php and includes/page_header.php
-
The problem has solved itself -.-
but would be nice if anyone can tell me how i can delete this ugly bug grey box outta there
www.p4ddy-online.de.vu/4images
acc: test pw: test
any idea?
-
The problem has solved itself -.-
but would be nice if anyone can tell me how i can delete this ugly bug grey box outta there
www.p4ddy-online.de.vu/4images
acc: test pw: test
any idea?
Should be in your rate_form.html, PM me if you need further assistance
treZ
-
i sent you a pm, don't know what to change that the grey box disappears.
-
i sent you a pm, don't know what to change that the grey box disappears.
Yes, please discuss further actions via PM with me, to keep this thread clean ;)
-
I setup my practice rateme site at lsatforum.com/rateme (http://lsatforum.com/rateme) and it looks great!
I have three problems I need to work on.
1. when I open the site, I just wanna skip the index page and go straight into pictures. It just makes easier for people. How do I do that?
2. Consequently I gotta have some category links on my site probably somewhere on top or the left side. How and where do I do that?
3. For random image information, I wanna show not only the average rating (which is {image_rating} i believe) I currently have but also your own rating (number you just clicked). hotornot.com as you click numbers, it will tell you your vote is 4, average vote is 5.66. However, this needs to be conditional. If you just voted, it will show up. Otherwise, it won't.
Thanks people!
-
I setup my practice rateme site at lsatforum.com/rateme (http://lsatforum.com/rateme) and it looks great!
I have three problems I need to work on.
1. when I open the site, I just wanna skip the index page and go straight into pictures. It just makes easier for people. How do I do that?
If you want your users to see directly the thumbnails, you can use the search.php, that allows you to specify how to sort the images (votes, rating, views, etc) Simply put a index.html into you root folder, with a redirect script to e.g. search.php?search_new_images=1 (http://search.php?search_new_images=1) to show for example the newest pictures
2. Consequently I gotta have some category links on my site probably somewhere on top or the left side. How and where do I do that?
That was explained many times, use the search ;)
3. For random image information, I wanna show not only the average rating (which is {image_rating} i believe) I currently have but also your own rating (number you just clicked). hotornot.com as you click numbers, it will tell you your vote is 4, average vote is 5.66. However, this needs to be conditional. If you just voted, it will show up. Otherwise, it won't.
Thats can be done with the "Save votes to database A" which V@no created, it will be a little addon to his MOD, so write him about that, and if he finds it necessary he will write it.
Thanks people!
-
Hi there,
i have install the Mod but not with the "bring to the next image after vote" function.
I will have a function that the radio buttons are disabled after vote. what must i do to have this???
this is my rate_form.html
<FORM action="{self}" method="post" target="_top">
<table width="235" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1"><div align="center">Bewerten! - Vote!</div></td>
</tr>
</table>
<table class="row1" border="0" cellspacing="1" width="235">
<tr>
<td align="center">1</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">6</td>
<td align="center">7</td>
<td align="center">8</td>
<td align="center">9</td>
<td align="center">10</td>
</tr>
<tr>
<td><input onclick=submit() type="radio" value="1" name="rating" ></td>
<td><input onclick=submit() type="radio" value="2" name="rating"></td>
<td><input onclick=submit() type="radio" value="3" name="rating"></td>
<td><input onclick=submit() type="radio" value="4" name="rating"></td>
<td><input onclick=submit() type="radio" value="5" name="rating"></td>
<td><input onclick=submit() type="radio" value="6" name="rating" ></td>
<td><input onclick=submit() type="radio" value="7" name="rating"></td>
<td><input onclick=submit() type="radio" value="8" name="rating"></td>
<td><input onclick=submit() type="radio" value="9" name="rating"></td>
<td><input onclick=submit() type="radio" value="10" name="rating"></td>
</tr>
</table>
<input type="hidden" name="action" value="rateimage">
<input type="hidden" name="id" value="{image_id}">
</form>
Thanks for help...
-
Do you have installed vanos Mod that vots are saved in DB?
So with this mod then you can check if a user already voted,
and if yes, don't show the rating form.
This has here in the forum already been posted i think.
-
Do you have installed vanos Mod that vots are saved in DB?
So with this mod then you can check if a user already voted,
and if yes, don't show the rating form.
This has here in the forum already been posted i think.
Yes i have install this Mod and when i use a Dropdown Form to rate then the Button where diabled after vote. But not with the Hot or Not Rate...
-
Do you have installed vanos Mod that vots are saved in DB?
So with this mod then you can check if a user already voted,
and if yes, don't show the rating form.
This has here in the forum already been posted i think.
Yes i have install this Mod and when i use a Dropdown Form to rate then the Button where diabled after vote. But not with the Hot or Not Rate...
You didn't do Step 3
-
You didn't do Step 3
I do but i donīt use the if - ifnot function. Thatīs all. Look at my rate form some replys above...
-
so you have to install it: (first post updated)
http://www.4homepages.de/forum/index.php?topic=7493.0
-
so you have to install it: (first post updated)
http://www.4homepages.de/forum/index.php?topic=7493.0
I think iīm very stupid but i have this mod in my galery and which if - endif tags must i use for the rating
{if user_rating} ????
-
<FORM action={if next_image_url}{next_image_url}{endif next_image_url}{ifno next_image_url}{self}{endifno next_image_url} method=post target=_top>
I don't think toure stupid, just read step 3
-
<FORM action={if next_image_url}{next_image_url}{endif next_image_url}{ifno next_image_url}{self}{endifno next_image_url} method=post target=_top>
I don't think toure stupid, just read step 3
hhmm, but this tags brings me to the next image, or not???
But i donīt will go to the next image. I will diable the radio buttons after vote...
-
I'am sorry, i cannot answer you on that question. The MOD is about to be like Hot or Not, so that includes to direct you automaticly to the next image. Maybe V@no or Oracle can tell you how to combine these two MODs :wink:
-
ok i tried it the hot or not thing came up but i when you rate a pic the page doesnt load it just gets an error page cant be displayed
??
can some one post back the hotornotback.gif
thnx
-
just to be clear on this part
1.
open details.php
find:
Code:
show_image($image_row, $mode, 0, 1);
move below:
Code:
unset($next_prev_cache);
i am cutting the first line of code and pasting it below unset($next_prev_cache);[/
???
-
just to be clear on this part
1.
open details.php
find:
Code:
show_image($image_row, $mode, 0, 1);
[b]move below[/b]:
Code:
unset($next_prev_cache);
i am cutting the first line of code and pasting it below unset($next_prev_cache);[/
???
yes
-
pls post bak the hotornotback.gif file...
-
pls post bak the hotornotback.gif file...
fixed, sorry for the delay. (*.gif file in my first post)
-
Hi Guys,
I also installed the Hotornot Mod and it works fine and the image also jumps to the next one after voting. now I noticed that the shown pic and the random image in the box on the left are the same.
Is this 'normal' or can it be changed? Changing it would be great, because this feature also provides easy navigation.
Thanks for your answers!
Silver
-
First of all, thanks for the Mod and the efforts you spend on development and support!
Anyway, i really tried a lot (probably too much), but i don't get it runing, as it should:
Main Problem is, after voting, you are not forwarded to the next picture. The same picture is displayed again; the vote got counted correctly.
I use rev. 1.7.3., the star rating mod (which works fine).
As mentioned above, conditional tag modification should not be necessary since 1.7.2. However, i had a couple of problems without modifiying the original template.php (parse error), so i swapped the whole "compile condition tags" to those over here: http://www.4homepages.de/forum/index.php?topic=7493.0
Now that conditional tags should be working, i tried version 'a' of the form tag, however this one caused a "file not found" (bad url, starting with method=post...)
This one (version 'b' without "&"):
"<FORM action={if next_image_url}{next_image_url}{endif next_image_url}{self} method=post target=_top>"
now works, however, as mentioned above, without moving to the next picture.
Going to the next picture works by clicking on the picture!
I tried so much and i'm so glad the voting itself is working now; please excuse that i can't report all detailed errors i had! :-)
***
Another unimportant thing: Where/How can i disable the reload / revote function?
***
Thanks in advance for your help!
Maybe anybody can provide a working rate_form and templates.php for 1.7.3? :)
Cheers,
Hardy
-
Hello,
since i've coded the MOD for 1.7.2 i can't give you any support - because i still don't use 1.7.3
The issue has to be somewhere in the rating_form.html within the tags - but what exactly, i don't know.
I hope someone with a much better level of PHP/HTML knowledge like V@no or Mawenzi can help you on that.
Good Luck :)
-
Does this mod work with one cataorie or all the catagories I would like if possible to keep my current catagories the way they are but yet addanother catagory that would run on the hot or not script.
Smoothice
-
that mod has nothing to do with categories - or did you mean the images in particular categorys? If yes: No, it works only for the whole 4images installation.
-
Hi i intalled this mod but when i vote details.php is not found cause there are this &&& sign comin in front of it does anyone know how can i fix this
-
I use version 1.7.2.
I Canīt install this mod.
When I vote, it appears a "&" in the middle of the link and an error page shows up instead of the next image.
-
same thing i was going thru no one helped me yet :((
-
MOD is tested only with version 1.7.1 - sorry guys ;)
-
can someone make this for 1.7.4 please
-
is it possible to show the last voting and the upcomin as an thumb ?
-
First of all, thanks for the Mod and the efforts you spend on development and support!
Anyway, i really tried a lot (probably too much), but i don't get it runing, as it should:
Main Problem is, after voting, you are not forwarded to the next picture. The same picture is displayed again; the vote got counted correctly.
I use rev. 1.7.3., the star rating mod (which works fine).
As mentioned above, conditional tag modification should not be necessary since 1.7.2. However, i had a couple of problems without modifiying the original template.php (parse error), so i swapped the whole "compile condition tags" to those over here: http://www.4homepages.de/forum/index.php?topic=7493.0
Now that conditional tags should be working, i tried version 'a' of the form tag, however this one caused a "file not found" (bad url, starting with method=post...)
This one (version 'b' without "&"):
"<FORM action={if next_image_url}{next_image_url}{endif next_image_url}{self} method=post target=_top>"
now works, however, as mentioned above, without moving to the next picture.
Going to the next picture works by clicking on the picture!
I tried so much and i'm so glad the voting itself is working now; please excuse that i can't report all detailed errors i had! :-)
***
Another unimportant thing: Where/How can i disable the reload / revote function?
***
Thanks in advance for your help!
Maybe anybody can provide a working rate_form and templates.php for 1.7.3? :)
Cheers,
Hardy
Exactly the same problem. :(
Can someone have a look at it? I hope it will not be a big problem as there are not much of changes involved in the mod.
Please :(
-
can someone make this mod work for 1.7.4 plz
-
Mod requested for 1.7.2
-
Yes, Can somebody please make this mod for version 1.7.4.
-
well i've just installed it on a 1.7.4, the only missing thing is, that it's not forwarding to the next image, but that isn't so bad isn't it :)
-
I "only" for 1.7.2 :)