Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - trez

Pages: 1 2 3 4 [5]
61
Discussion & Troubleshooting / User screen resolution
« on: January 27, 2006, 01:51:17 PM »
edit: I don't post this topic in the Styles forum, because i has to do with coding. If i'am wrong move it ;)

Ok, i, and maybe most of you have the following problem.

The most of us are using a screen resolution of 1280x1024 when designing the page etc. So we made and style our 4images gallery to look best in our resolution.
But the problem is, that most of the visitors are using still 1024x768 (notebooks, etc), and when they enter the main page, they have to scroll down lot or less to get to the end of the page.

So, there are many html and javascript resolution redirection scripts in the net, but they redirect the user to a different html. Of course, i can make 3 templates, and make a hidden chek before the user enters the page, then he would be redirected to the template that is for his resolution and everything would be fine. BUT, we don't wanna make 3 different templates.

I was thinking about 3 different style.css, with edited font size tags and procentual heigh and widh tags.

Any idea or other option to solve my problem? Many beta-testers of my site have said "oh, there was more when i scroll down?" - thats not good

62
Mods & Plugins (Requests & Discussions) / [MOD] Hot or Not Rating
« 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
4images: www.zapomnime.com *user name "test", password "test"*

Required MODs
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:
Code: [Select]
show_image($image_row, $mode, 0, 1);
move below:
Code: [Select]
unset($next_prev_cache);
save file

2.
open details.html

find:
Code: [Select]
{image}
replace with:
Code: [Select]
{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 If not, delete it.

find:
Code: [Select]
{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:
Code: [Select]
<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

replace with:
Code: [Select]
<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:
Code: [Select]
<FORM action={if next_image_url}{next_image_url}&{endif next_image_url}{self} method=post target=_top>



find:
Code: [Select]
  <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:
Code: [Select]
  <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

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):



Your done! Thanks a lot to V@no (who wrote the redirect function) and to Lavazza (Yes coffee is important when you code)  :lol:


63
Discussion & Troubleshooting / Redirect to next image after vote *solved*
« on: January 23, 2006, 05:05:06 PM »
Hello ;)

I love 4images, i've installed over 30 MOD's and i'am glad that there are people like V@no, TheOracle & Acid, that are providing us with interesting and usefull MOD's

But i'am still a PHP newbie, and i can't get some special thing work.

Q: Is it possible to redirect the user, after he submitted a vote, to the next image in the category, if there is one? By default, it takes you again to the image you've just voted for. Any way to change this?

edit: I've searched the whole forum for "rating" and "redirect", but i don't found an answer - if there is a similiar topic please excuse :)

I'am using RadioButtons as a rate form, e.g.:

Code: [Select]
<FORM action={self} method=post target=_top>

                        <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>
                            </tr>
                            <tr>

                              <td><input onclick=submit() type="radio" value="1" name="rating"></td>
                              <td><input onclick=submit() type="radio" value="2" name="rating"></td>                   
                            </tr>

                          </table></TD>

 <input type="hidden" name="action" value="rateimage">
  <input type="hidden" name="id" value="{image_id}">
</FORM>


So, thinking logically i have to use these tags:

Code: [Select]
{if next_image_url}<a href="{next_image_url}">{endif next_image_url}
{if next_image_url}</a>{endif next_image_url}

But anything i tried is not working, maybe i have to change some comang in a *.php file? This is very important for me, so i would be very happy if anyone could help me solve my problem.  :) Thanks for your time

edit2: Looks like there is a diffeerence between FIrefox and IE related to this. I put the {rate_form} before the image, like this:

Code: [Select]
{if next_image_url}<a href="{next_image_url}">{endif next_image_url}
   {rate_form} {image}
{if next_image_url}</a>{endif next_image_url}

Now, Firefox is taking me to the next image after i rate it, but IE doesn't - Please help me :)


Pages: 1 2 3 4 [5]