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.


Messages - NetRebel

Pages: [1]
1
Hi there all,

For a new site I have added an additional field "images_autoload". It works just fine when uploading, viewing details and editing, but I can't seem to get it to work in a new file I created in the MEDIA folder.

Specifically. I have entered value "SPACE TAXI" in the new added "images_autoload" field. It shows it's value on the details page, but I would like to use the value in the HTML code inside the media folder.

Example; for a plain JPG image, the next code is used: <img src="{media_src}" etc...
This will insert the value of media_src into the jpg template inside the MEDIA folder.

I would like to use my value in image_autoload also using this technique, like:
<autostartPRG='{images_autoload}'>  etc...

Unfortunately this doesn't work. I can use the value in images_autoload inside a temlate file, but not inside a template that is in the MEDIA folder.

Suggestions?

[Edit]

Alternatively, I found that I can use PHP inside these MEDIA templates. Maybe there is an easy way to read the contents of custom fields (in my case images_autoload) into some PHP variable?

[Edit 2]

I found that something like $testvalue="{image_autoload}"; works fine inside the details.html template, but it doesn't in MEDIA/ templates. Someone knows a way to "transport" the value to there?

2
Yes, it's working great now! :D
Thanks a lot for your help V@no, and thanks brandonc for the original mod of course!

3
Sounds like a great mod. Unfortunately it results in a

Fatal error: Call to undefined method Upload::save_downloaded_file() in /home/netrebel/public_html/files.netrebel.net/includes/upload.php on line 306

I can't find the save_downloaded_file() anywhere else in the code, so I tried changing it to move_downloaded_file but that didn't work either. How come maineyak writes it is working okay. Did I miss something?

4
Mods & Plugins (Releases & Support) / Re: [MOD] Multi-Lightboxes v1.03.1
« on: August 10, 2008, 05:37:36 PM »
Thank you once again V@no. You've really been a great help with this and other "problems" we had with changing things in 4Images to suit our needs. Our site is getting closer and closer to what we have in mind thanks to the great 4Images script and your invaluable help. We have added your name in our "Site Credits" page. ;-) Keep up the good work and this great support!

5
Mods & Plugins (Releases & Support) / Re: [MOD] Shoutbox
« on: August 10, 2008, 12:17:37 AM »
I must say... this is the WORST MOD I ran into so far. :?

It ignores the table prefix settings on install, resulting in SQL errors right away from the start.
The templates are totally messed up, useless.
After fixing the previous stuff, there are still loads of errors popping up on various pages.

Sorry, this is just lame.

6
Mods & Plugins (Releases & Support) / Re: [MOD] Multi-Lightboxes v1.03.1
« on: August 09, 2008, 08:54:10 PM »
Thank you very much V@no, you're the best! I already tried to get it working somehow by finding the highest Lightbox ID, add 1 to it and write back the calculation. But that was a lot of (unnessecary) code, yours is WAY better and more reliable when the highest numbered lightbox gets deleted again.

I also had to add your code to the lightbox.php because otherwise new (multiple) lightboxes that were created still had this random number.
I have put your code in lightbox.php after:

     
Code: [Select]
else
      {
        $status[0]['msg'] = preg_replace("/".$site_template->start."name".$site_template->end."/iU", stripslashes($name_new), $lang['lightbox_create_error']);
        $status[0]['error'] = 1;
      }

I'm not sure if that is the exact correct place to put it, but it al works exactly as I wanted now.

Thank you so much again!

7
Mods & Plugins (Releases & Support) / Re: [MOD] Multi-Lightboxes v1.03.1
« on: August 09, 2008, 05:14:30 PM »
Okay, I REALLY tried, but my PHP and MySQL knowledge is just to limited to figure out this one by myself.

I found that the Lightbox ID is generated in collection.php under:

      $lightbox_id = get_random_key(LIGHTBOX_TABLE, "lightbox_id");

I just want this lightbox ID to be a sequential number. Can someone PLEASE give me the PHP code to read the SQL database for the last record number and then just add one to it?

So basically I want the lightbox_id just to be the same as the ID in the SQL. I know there is some info in the SQL about the next unique number to use. When I look into the database using PhpMyAdmin I can see a "Next Autoindex". Basically all I want is to replace the get_random_key part with this Autoindex, so the lightbox_id will just be the record ID of the record in the SQL.

Can someone please help? It shouldn't be too difficult, but my PHP capabilities are just too limited. :-(

8
Hi,

Once again, this mod is great! (Just installed it on another board). One question though. Well, actually it's three questions, but if one gets answered, I pretty much can find out the others myself. ;-)

- Can I have "normal" or at least some shorter lightbox ID's? id=de40091253f62f2d2baf1fe89cca47ef isn't really "user friendly".
- Is there some "info" coded in this ID, or is it just randomly generated?
- Where is this lightbox ID generated?

I'm thinking about making the lightbox ID just a user_id followed by a lightbox number. Like if user 30 wants to publicly display his sixth lightbox, it would just be lightbox ID 00300006 or something even shorter depending on the expected max. number of users and the max number of allowed lightboxes. It could as well be as short as 0306 for small sites with just 9 lightboxes per use.

[edit]

Okay, I just found out that I can just edit the name directly in the SQL and it seems to work fine. I guess the long generated number is just some "security" so people cannot "quess" lightboxes that are not public? It that so? I am using 4images not for images and the lightbox not as a lightbox, so any "lightbox" should always be visible to everyone. :-)

So the most "important" question (for me) remains: where is this number generated so I can edit it?

9
Ah, okay. Starts to make sence now. :-)

So basically 4images just doesn't "know" which word a title/name starts with but more sort of holds an index that "tells" it that a word, for instance "fast" appears in image 14, 70, 101, 250 etc. without 4images actually knowing how or where the word is in those images?
Guess the search function will be of no use then (like you already told me). I'll have to come up with some routine that just reads throug all the images or maybe create a hidden custom field for this.

Thanks again V@no, I'l' try some other approach.

10
Thank for your reply V@no. Perhaps I didn't ask the question the right way or I'm just misunderstanding you, but I'm pretty sure 4images DOES search the titles. Whatever name I give an image, 4 images will find it (using the quick search) when I enter a word that is in the name of the image. I'm not speaking of the actual FILEname of the image, but the name that is given and put in the SQL database when someone uploads an image.

11
Hi all,

I am building a UMD™ VIDEO database using 4images. Besides the standard search, I would like to search for all titles starting with a certain character. For instance, I would like to do a search for all titles starting with "B" and then it should provide a list like Bad Boys, Bad Santa, Barbershop etc. and NOT (like it does now) with the character B anywheren INSIDE the title.

Does anyone know if this is possible and if so, what URL should I use for this?

I want to create a line in my header like A | B | C | D | E ... etc which would enable the users to search the database in an alphabetic index order.

12
Nice and easy to implement MOD, thank you! Extremely annoying site though. Why do webmasters keep thinking people want pop-up shit when visiting a site? :evil:

13
Mods & Plugins (Releases & Support) / Re: [MOD] Last comments v1
« on: July 20, 2008, 03:24:44 PM »
Really Excellent MOD, thanks a lot! One tiny little remark/correction though...

I am using 4images for a (PSP) UMD movie list with info. Therefore I changed the image_id tag to umd_id in constants.php. (That way the URLs look nicer for a UMD specific site.) Because of this I had to change the line...

Code: [Select]
"comment_image" => ($view_image) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$row['image_id'])."\">".$thumb."</a>" : $thumb,
...to...

Code: [Select]
"comment_image" => ($view_image) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?umd_id=".$row['image_id'])."\">".$thumb."</a>" : $thumb,
Wouldn't it be better and more correct following the 4images structure to have this part in the code follow the settings in constants.php? That way your mod will work for anyone who also changed the image_id to something else.

For the rest, great mod, I like it a lot and it was very easy to implement. Thanks again!  :thumbup:

14
Discussion & Troubleshooting / Re: Exclude Category from New Images
« on: April 13, 2008, 02:22:32 PM »
... in index.php find in //--- Show New Images ---- the following ...

Oh... if only everything in life was this easy! :wink: Thanks for this perfect, yet simple solution. It's exactly what I was looking for to exclude some "adult" content categories from being displayed on the frontpage. :-D

15
Holy sh*t, that was a lot of code editing! 8O Thank God for two displays and the invention of cut-n-paste! :D

Thanks a lot for this great great mod! I just can't believe everything is working without any errors in one time. No debugging, no fuzzy errormessages, it all works right 'out of the box'. Great work, thanks again!

Pages: [1]