Author Topic: One category images opening up as pop ups?  (Read 4287 times)

0 Members and 1 Guest are viewing this topic.

Offline Cat

  • Newbie
  • *
  • Posts: 21
    • View Profile
One category images opening up as pop ups?
« on: December 18, 2002, 09:12:35 PM »
Hey, i just installed 4images and seems to work greatly:)
What i wonder tho is, if there is a way to get 1 of the categories to work different ways. I will have 4 categories; 3 of them with smaller images and the last with  (user submitted) wallpapers. It causes horizontal scrollbars to whole page and i can't stand them.. is there a way to get the thumbnails in the listing to open up as pop ups? I wouldn't want to make any changes to rest of the categories, they work well how they are now. Maybe something that prevents the image to show in full size but only as downloaded?
eg.. max width 500 into code..In this point i have to say i'm php dummy too.
I tried searching info but as i cannot understand german i'm pretty clueless if there is already solution posted out or not, at least wasn't in english. Rest problems i have been able to solve out with the seach here, so far.

I'll really appreciate your answer:)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Not really
« Reply #1 on: December 19, 2002, 05:02:14 AM »
'fraid not.  This is really an all or nothing thing.  

1.  You can use {thumbnail_openwindow} instead of {thumbnail} in the thumbnail_bit.html template to cause the images to open in a new window.  The window characteristics are controlled through the javascript function opendetailwindow() in header.html.  But there is no way to selectively apply this to only one category.

2.  You can control the image size of uploaded files by changing the settings in the "Auto-Image-Resizer" in the admin control panel.  But since the default upload form that ships with 4images doesn't provide an option to enter a "download url", this won't really get 4images to do exactly what you want here.

So try modifying your memeber_uploadform.html template.  Look for this line:
Code: [Select]
<tr>
            <td class="row2" valign="top"> <b>{lang_media_file}</b><br /> <span class="smalltext">
              {lang_max_filesize}<b>{max_media_filsize}</b><br />
              {lang_max_imagewidth}<b>{max_media_imagewidth}</b><br />
              {lang_max_imageheight}<b>{max_media_imageheight}</b><br />
              </span> </td>
            <td class="row2"> <b>Upload:</b><br /> <input type="file" name="media_file" class="input" />
              <br /> <b>URL:</b><br /> <input type="text" name="remote_media_file"  size="30" value="{remote_file}" class="input" />
              <br /> <span class="smalltext"><b>{lang_allowed_file_types}</b>
              {allowed_media_types}</span> </td>
          </tr>

Right after the closing </tr> tag shown above, insert a new HTML table row like this:
Code: [Select]

          <tr>
            <td class="row2" valign="top">&nbsp;</td>
            <td class="row2"><p><b>Download URL:</b><br />
                <input name="image_download_url" type="text" class="input" value="{image_download_url}"  size="30" />
              </p>
              </td>
          </tr>

I'm pretty sure the member.php code that processes the upload form will accept and store the download url in the database.  Be aware that this means your users will have to supply a URL for the download which means they must host the images to be downloaded.  They can't be uploaded and stored on your server like the auto-resized images and the thumbnails.

Offline Cat

  • Newbie
  • *
  • Posts: 21
    • View Profile
Thought so..
« Reply #2 on: December 19, 2002, 08:41:12 PM »
Hey and thank you for so quick reply!
I tested out the choice 1 and it would have been great choice unless i didn't plan to post out also icons.. sigh i'm picky, BUT.. someone else can find the info here now and use it.
I finally solved it out my ways, as using the resizing feature you mentioned about(which made images smaller permanently), and adding to description a pop up java script without locations etc...including the full sized image/and to header the function code.
I decided also to not to go with the usersubmitted part, actually i hassled the code so badly i ended up taking whole membership part away , also lightbox and zip downloads.. :oops:
 I noticed too my GD 1.62 probably doesn't support gifs and i had to put gif files to separated pop up too..it couldn't create the thumbnails at all, and I read from this forum GD 2 doesn't support them so i suppose GD1.6 doesn't either. Anyhow, i like how it is now,and as  i'm redoing my whole site next month the layout can wait still..i can slowly upload everything there to wait now.
And.. what i really like the most is the fact it's perfectly coded.. no errors nothing.. After trying out at least 5 different image galleries this  is a pearl and i'll get my hands to it later on again if i need to put back the login forms and random images. It will work greatly for my images, not for my downloads but but..maybe in future  :D
 Thanks so tons for your help.. and very merry Christmas as well:=)