4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Bomba on February 25, 2003, 10:49:25 PM

Title: Random Images of one category
Post by: Bomba on February 25, 2003, 10:49:25 PM
hello i want to create a private category where only users with permission can submit their pics and i would like to have in the index.php a line of 6 random pics from that category. i would use this random pics above the last submited images on the index.php.

is this possible? it would be great. thanks
Title: Random Images of one category
Post by: Bomba on February 25, 2003, 10:53:42 PM
and also when people enter that category is it possible to show the usernames with the permission to submit the pics.

it would be something like this:

CATEGORY OF HONOUR:
featuring the users: username1; username2; username3; ... and this would work as links to their profile pages.

thanks
Title: Re: Random Images of one category
Post by: V@no on February 26, 2003, 12:07:51 AM
Quote from: Bomba
hello i want to create a private category where only users with permission can submit their pics and i would like to have in the index.php a line of 6 random pics from that category. i would use this random pics above the last submited images on the index.php.

is this possible? it would be great. thanks

this is pretty simple to do:
for the category set upload permission to "private"
then greate a users group for that category.
then asign "honored" users to that group.
Title: Random Images of one category
Post by: Bomba on February 26, 2003, 12:21:43 AM
:) i guess i didn't explain myself
i know how to do that

1. what i want is to show on the index.php a line of 6 random images from that category.

2. and also i would like to put a text at the top of that category when people enter the category. for example:
"category name
 featuring the users: name1; name2; name3; ..." these names would be links to their profile pages

thanks
Title: Random Images of one category
Post by: helluvaguy on February 26, 2003, 12:59:17 AM
Quote from: Bomba
1. what i want is to show on the index.php a line of 6 random images from that category.
Maybe it would help if you change the {random_image} tag to the {random_cat_image} tag. You'll probably have to specify the category to display, but i wouldn't know where to do that. sorry
 
Quote
2. and also i would like to put a text at the top of that category when people enter the category. for example:
"category name
 featuring the users: name1; name2; name3; ..." these names would be links to their profile pages
Why don't you just wright it in the description of that catogory, yourself?
Title: Random Images of one category
Post by: Bomba on February 26, 2003, 01:07:27 AM
i don't want to write it at the description. i want to write it at categories.php and i wanna know how to do the changes only for that specific category.

cause if i write a description in categories php it will show on every single category page.

anyway, thanks for trying to help
Title: Random Images of one category
Post by: Bomba on February 26, 2003, 07:20:32 PM
Code: [Select]
this is pretty simple to do:
for the category set upload permission to "private"
then greate a users group for that category.
then asign "honored" users to that group.


and how can i show in the index.php a line of 6 random thumbnails from that category?
Title: Random Images of one category
Post by: V@no on February 26, 2003, 09:04:57 PM
Quote from: Bomba

and how can i show in the index.php a line of 6 random thumbnails from that category?

it was actualy simplier than I thought  :D
in index.php find:
Code: [Select]
       WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
change it to:
Code: [Select]
       WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id = XX
Where XX at the end is number of your category
Title: Random Images of one category
Post by: Bomba on February 26, 2003, 11:56:21 PM
but what exactly will this do?
i don't want to delete the last submited images or the current random image code
i just want to add a line of 6 random images from that specific category at the top of my index.php, where it will be above the last submited images.

sorry for my lack of knowledge
thanks
Title: Random Images of one category
Post by: V@no on February 27, 2003, 01:27:58 AM
well, use that (http://4homepages.de/forum/viewtopic.php?t=4259) code, and do the changes I posted in this thread.
Title: Re: Random Images of one category
Post by: bine on March 16, 2005, 11:19:11 PM
V@no
Quote
well, use that code, and do the changes I posted in this thread.

Hi, is the code behind the broken Link 'that code' still available in the forum? I didn't found something by searching.
I also like to create random images from one specified categorie.