vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Gallery for vBulletin 3.5.X (https://vborg.vbsupport.ru/showthread.php?t=92875)

Necrosaro420 06-29-2006 09:58 PM

Quote:

Originally Posted by Harald_T
Just to add one important thing:

This hack is based on the "Thumbnail on Forumdisplay"-Hack, which was original written by Dechevious, so credits go also out to him.


Can user's submit there own pics?

Harald_T 06-30-2006 07:03 AM

Yes, they can. The only thing, the admin needs, is to setup a forum for the user and create a gallery out of it.

ltaylor 06-30-2006 12:00 PM

*clicked installed*! I'll be back with a review once installed.
Thanks for creating and sharing!!

kofoid 06-30-2006 09:40 PM

Help!

godaddy shut my site down due to this mod :(:(:( and it's so so awesome! It seems that the following queries caused Go Daddy's CPU utilization soar to over 80% and almost brought down the entire shared server:

Quote:

SELECT gallery, threadid, firstpostid, Yadathread.title, attachmentid, Yadaattachment.dateline FROM Yadaattachment, Yadathread, Yadaforum
WHERE gallery='1' AND Yadathread.featured!='1' AND Yadathread.forumid=Yadaforum.forumid AND Yadathread.firstpostid = Yadaattachment.postid AND Yadaattachment.dateline < 1151690651
GROUP BY Yadathread.threadid
ORDER BY Yadaattachment.attachmentid DESC LIMIT 5 |
SELECT gallery, threadid, firstpostid, Yadathread.title, attachmentid, Yadaattachment.dateline FROM Yadaattachment, Yadathread, Yadaforum
WHERE gallery='1'AND Yadathread.featured!='1' AND Yadathread.forumid=Yadaforum.forumid AND Yadathread.firstpostid = Yadaattachment.postid AND Yadaattachment.dateline < 1151690653 ORDER BY RAND() LIMIT 5 |

SELECT gallery, threadid, firstpostid, Yadathread.title, attachmentid, Yadaattachment.dateline FROM Yadaattachment, Yadathread, Yadaforum
WHERE gallery='1' AND Yadathread.featured!='1' AND Yadathread.forumid=Yadaforum.forumid AND Yadathread.firstpostid = Yadaattachment.postid AND Yadaattachment.dateline < 1151690653
Can anyone let me know what I can do in order to KEEP this mod on my site? It seems that the above queries are the forumhome ones for the display 5 random images option.... is that right? If so, is there ANY way I can get this to work without as many queries?

Harald_T 06-30-2006 10:15 PM

@Kofoid: I'm aware of this problem, also it should only add some queries to the page, but not that much, that the site breaks down. I'm thinking over this, if i can reduce the amount of queries used in these routines.

kofoid 07-01-2006 01:38 PM

Thanks Harald!! You rock! :)

ltaylor 07-01-2006 04:00 PM

Hi Harold & Everyone,

First, the hack is awesome. I installed it last night. I have a few changes to make to imput link on navbar as I've also just recently installed a custom skin..(need to work with the coding).

Anyways, one problem I'm having is showing the latest gallery additions in the user cp. I am in the midst of searching all the posts in this thread to find the answer, but in the event someone knows..it would be great if you could direct me.

Thankyou!

Necrosaro420 07-02-2006 12:19 AM

Quote:

Originally Posted by Harald_T
Yes, they can. The only thing, the admin needs, is to setup a forum for the user and create a gallery out of it.

Is there an option so that I do not have to set it up for a specific user? I run a video gaming site, and I want to allow user's to post the pictures of the collections that they have, but I dont want to have to baby it and set each individual one up.

Thanks!

Harald_T 07-02-2006 08:52 AM

@Necrosaro: That would mean, that your users would be able to open up a gallery for themself. I have to check this, can't say atm.

Harald_T 07-02-2006 08:22 PM

@Kofoid: Try this code for the plugin: gallery_images_forumhome

Code:

// #################### Latest Gallery-Additions #######################
// fetch the permissions for each forum
// global $vbulletin;
if ($vbulletin->options['show_latest']) {
$gal_num_rows = $vbulletin->options['gal_num_rows'];


$thumbs = $db->query_read("SELECT gallery, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ."
GROUP BY ".TABLE_PREFIX ."thread.threadid
ORDER BY ". TABLE_PREFIX . "attachment.attachmentid DESC LIMIT $gal_num_rows");



while ($gallery = $db->fetch_array($thumbs))
{
eval('$latestgallery .= "' . fetch_template('gallery_latestpictures') . '";');
}

}
// #################### Random Gallery-Additions #######################
// fetch the permissions for each forum
if ($vbulletin->options['show_random']) {
$random_thumbs = $db->query_read("SELECT gallery, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1'AND ". TABLE_PREFIX . "thread.featured!='1' AND  ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ." ORDER BY RAND() LIMIT $gal_num_rows");

while ($rand_gallery = $db->fetch_array($random_thumbs))
{
eval('$random_gallery .= "' . fetch_template('gallery_randompictures') . '";');
}

}
$top5 = $db->query_read("SELECT gallery,". TABLE_PREFIX . "thread.featured, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline, ". TABLE_PREFIX . "thread.views FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1' AND ". TABLE_PREFIX . "thread.featured!='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ." ORDER BY ". TABLE_PREFIX . "thread.views DESC LIMIT $gal_num_rows");

while ($top_gallery = $db->fetch_array($top5))
{
eval('$top5_gallery .= "' . fetch_template('gallery_top5') . '";');
}

// featured forum

$feat_rows=$gal_feat_rows;
$featured_thumbs = $db->query_read("SELECT ". TABLE_PREFIX . "thread.featured, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, MAX(". TABLE_PREFIX . "attachment.attachmentid)AS attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE ". TABLE_PREFIX . "thread.featured='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ."
GROUP BY ".TABLE_PREFIX ."thread.threadid
ORDER BY ". TABLE_PREFIX . "attachment.attachmentid DESC LIMIT $feat_rows");



while ($featured = $db->fetch_array($featured_thumbs))
{
eval('$featured_gallery .= "' . fetch_template('gallery_featured') . '";');
}

This will remove two queries, if those gallery-options are not used. Tell me, if it works, and i'll build up the whole plugin this way. This is just a workaround, no final solution for this problem. But it may help a bit.

Tanya123 07-02-2006 08:24 PM

Quote:

Originally Posted by christianb
No problem

What I did was went to the VBA CMPS => Add module => Module Type [Template]

Module Title - Gallery (Or whatever you want)
Column [Center Column]
Display Order 20 (whatever you want here)
Active Yes
Template to Include: adv_portal_gallery
Template Content:

PHP Code:

<if condition="$vboptions['show_latest']==1">
     <
tr>
          <
td colspan=$gal_num_rows align="center">Latest pictures in the gallery:
     </
tr>
     <
tr>$latestgallery
</if>

<if 
condition="$vboptions['show_random']==1">
     <
tr>
         <
td colspan=$gal_num_rows align="center">Random pictures from the gallery:
     </
tr>
     <
tr>
          
$random_gallery
     
</tr>
</if> 

Use Module Shell Template - Yes
Module Link: (I used this and put it directly to my gallery (same as the link for the navbar - remember your forum ID)

Permissions are up to you - I disallow unregistered and banned users to save bandwidth

I did this and it worked out somewhat. Take a look at my homepage ... I see red x's. I searched this thread and came up with nothing. Help! It shows correctly on my forums page.

Harald_T 07-02-2006 10:12 PM

Red X: It's possible, that your attachment-settings are not right. Please check under the Attachment-Manager, if your vB creates Thumbsnails for your attachments. See the rest in my PM.

Gehanna 07-03-2006 01:10 PM

Hello Harald_T,

Would you still be willing to help me figure out how to correct the issue with the black space showing up with the thumbnail images? You made mention that it could possibly be corrected via. css tags or something like that.

Also, I just noticed that for some reason, the gallery submissions aren't showing up in member profiles.

Click here for what I mean: Gehanna's Profile


Gehanna

imported_magjr 07-03-2006 01:13 PM

Quote:

Originally Posted by Harald_T
Use your vbulletin-settings for this.

@all: i have three weeks holidays now, so i have a plenty more time to work on the gallery. So, expect more soon.

Does this mean you'll be able to reply to my pm that's been sitting in your inbox for two months now?

calgdsm 07-03-2006 02:03 PM

Harold,

1. THANK YOU!!

2. HELP!!!!

Everthing went pretty smooth so far untill i got the point where i needed to edit the template FORUMDISPLAY. In the install guide it says to edit this

$thread['hiddencount']++;
}

eval('$threadbit .= "' . fetch_template('threadbit') . '";');

}


I cant find that ANYWHERE! Am i using the correct vb version? im not sure what to do. below is the closest i can find.

</if>
</tr>
</if>
<if condition="$show['threads']">
<!-- show threads -->
<if condition="$show['stickies']">
$threadbits_sticky
</if>
$threadbits
<!-- end show threads -->
<else />
<!-- show no threads message -->
<tr>
<td class="alt1" colspan="$foruminfo[bottomcolspan]" align="center">
<div style="padding: 16px">
<if condition="$show

calgdsm 07-03-2006 02:06 PM

I think i just solved it, It says open the FILE not template. sorry

calgdsm 07-03-2006 03:46 PM

Working!!

But still a few problems.

1. Some of the titles are in German! Can i fix this?

2. the link to the gallery is not working. the text is there but the link does not go to the gallery.

Other than that this kicks Ass!!! Great Job!

Can this handle video files aswell?

calgdsm 07-04-2006 02:44 AM

Bump! Fixed the nav link.

Is there anyway to make everything english i have like 0 german speaking vistors. (That i would like to change, If theres any German DSM Owners drop by the site)

Great Job BTW!!!!

Heres a good idea for an add on to this, how about make it possible to have a highest rated, most viewed ect option can you do this?? that would be great.

squall leonhart 07-04-2006 10:11 AM

I hv just downloaded vbgallery_123.zip and set up to my forum, do whole step in guide file.

1. It works well at Gallery Latest Pictures in the gallery: but the pic is too big, it's not auto resize to fit to home page.

2. It presents in forum is different with the introduce of this mod.

3. i try do do follow anything 3rd time but still can't make Category like intro

Could you please write the full guide agian for everybody, ths a lot

Charles_1 07-04-2006 03:16 PM

Hi Harald_T

At first I would like to thank you for your support for this hack. I installed it (version 1.23) yesterday, but it did'nt work completely so far :-(. I read whole this discussion, but without luck - no solution to my issues.

Look at: http://www.svethardware.cz/forum and click "Gallery" in the navbar. Just blank page.

I installed it correctly (last version) via Admincp -> Plugin System -> Manage Products -> Add/Import Product. Then I followed instructions provided by you at install_vbi_gallery_123.html file and done necessary editing of templates and php file, exactly as instructions said.

Then I created new category (named as Gallery), which has no Parent Forum and I set Display Order to 0 (so it's not visible). Option "Act as Forum" is set to "No". There are two forum settings relating to this hack: "Act as a gallery?" and "Gallery-Category?". In this case I set only "Gallery-Category?" to "Yes" (so "Act as gallery?" is set to "No"). ID of this category is 39 so I set this number at Admincp -> vBulletin Options -> Gallery -> Category-Id.

After this I created in this category (named Gallery) sub-forum named "Test", "Act as forum" is set to "Yes", "Act as Gallery?" is set to "Yes" and "Gallery-Category?" is set to "No". So far, so good.

But when I click on link in navbar (which points to this: http://www.svethardware.cz/forum/forumdisplay.php?f=39), that just only blank page appears, nothing else - just blank white page - end :-(

I also tried uninstall it and import XML file, which you attached to your post #960, but no effect to this.

Could you please look at my problem and help me find solution? I need gallery to improve functionality of our forum and I am stuck right now :-( I set permissions to "all yes" for "Gallery" also for unregistered users for testing purposes.

squall leonhart 07-04-2006 04:12 PM

1. Yup, i did do exactly like ur and i could not create the catergory too, it is only present the blank like ur situation. you can see it http://www.jovp.org

2. And one more problem is i can not post a new thread, it also present blank. I dun know why?can you help me to fix this error

3. Could you please to help me one more thing? My attached thumbnail present the pic so big like the original size before upload, i dun know how to fix it. http://jovp.org/forum/showthread.php...sted=1#post115 I want it present like this forum small one.

4. And how come if i dun want guest see the Galerie Latest Pictures in the gallery. Only mem can see it? In fact, i dun want it present "x" with the guest it will make the forum looks so stupid.

zyad 07-05-2006 10:32 PM

hello, I just installed vBgallery and received an SQL error. I was wondering if there was any way of removing this since i cannot access anything except for phpmyadmin??


thanks in advance

Error:

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT gallery, threadid, firstpostid, thread.title, attachmentid, attachment.dateline FROM attachment, thread, forum
WHERE gallery='1' AND thread.featured!='1' AND thread.forumid=forum.forumid AND thread.firstpostid = attachment.postid AND attachment.dateline < 1152142157
GROUP BY thread.threadid
ORDER BY attachment.attachmentid DESC LIMIT 5;

MySQL Error : Can't open file: 'attachment.MYI' (errno: 144)
Error Number : 1016
Date : Wednesday, July 5th 2006 @ 04:29:17 PM
Script : http://....................../
Referrer :
IP Address : .......................
Username : ......
Classname : vb_database

Harald_T 07-05-2006 11:45 PM

@Charles: Unset the "Gallery-Category"-Option. It's not needed. Atm this option creates an error, so just leave it set to NO.

Harald_T 07-05-2006 11:47 PM

@Squall: Could you contact me via PM?

@Zyad: In your phpadmin look for the vb-options. There is one option that enables/disables the plugins. Set it to 0, so the plugins won't work any longer. After this, you can remove the plugin or deactivate it.

zyad 07-05-2006 11:56 PM

Hey Herald_T, thanks for your help!!!

I was taking a look at that table and this is what i found under it (is vb-options the plugin table in the db??):

itemid
active
displayorder
cost
tax
refilldateline
defquantity
quantity
sold
allowedgroups
deniedgroups
name
imagelocation
description
tablename
wherename
wherevalue
setname
settype
setvalue
scriptlocation
inputfields
expirydate
loghistory
category
showinstore
changealways
overridepermissions
optionsettings
floodcheck
autobuildcost

Thanks again!!

Charles_1 07-06-2006 11:19 AM

Quote:

Originally Posted by Harald_T
@Charles: Unset the "Gallery-Category"-Option. It's not needed. Atm this option creates an error, so just leave it set to NO.

Thank you for you reply. I tried different combinations, and that one were one of them too. But no luck.

When I set option "Gallery-Category" of category named "Gallery" with ID 39 to "No", then link in the navbar works fine. But when I go to sub-forum named "Test", I can see two images with descriptions (that means two threads with one attached image to first post), so it looks OK, but when I click the button "Upload" or New thread (in our language it is "Nov? t?ma"), then only thing I get is already mentioned blank page :-(. Those two threads with attached images I created for testing purposes in situation, when the option "Act as gallery" of sub-forum named "Test" with ID 40 was set to "No" -> they were normal threads.

Harald_T 07-06-2006 01:06 PM

@Charles_1: Can you contact me via pm?

Tyegurl 07-06-2006 05:04 PM

did you find a way for users to create their own gallery?

that would be great if you did...

Harald_T 07-06-2006 05:22 PM

Not yet. To be honest, it's to warm here to work.

Tyegurl 07-06-2006 05:25 PM

Quote:

Originally Posted by Harald_T
Not yet. To be honest, it's to warm here to work.

okay lol i am in no hurry....yet.....

only working on a test board. i have no gallery installed yet as i am waiting for you to figure out the user gallery part...i have no coding know how or i would do it.

calgdsm 07-07-2006 01:07 AM

Quote:

Originally Posted by calgdsm
Working!!

But still a few problems.

1. Some of the titles are in German! Can i fix this?

Can i fix this the file size is in german i think i cant read it. can you tell me how to fix it.

I love the HACK great job!!

Harald_T 07-07-2006 09:10 AM

Dateigröße = Filesize. You find it in the template "gallery_threadbit". It's twice there, as much as i remember.

seany1 07-07-2006 09:31 AM

Thanks Harald worked first time, very much appriciated :)

is there any way to show submissions on the postbit, if not then not to worry.

again thanks for a great gallery

Seany

Charles_1 07-07-2006 11:43 AM

Quote:

Originally Posted by Harald_T
@Charles_1: Can you contact me via pm?

Yes, of course. I did it already (sent PM yesterday).

kofoid 07-08-2006 11:40 PM

Quote:

Originally Posted by Harald_T
@Kofoid: Try this code for the plugin: gallery_images_forumhome

Code:

// #################### Latest Gallery-Additions #######################
// fetch the permissions for each forum
// global $vbulletin;
if ($vbulletin->options['show_latest']) {
$gal_num_rows = $vbulletin->options['gal_num_rows'];


$thumbs = $db->query_read("SELECT gallery, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ."
GROUP BY ".TABLE_PREFIX ."thread.threadid
ORDER BY ". TABLE_PREFIX . "attachment.attachmentid DESC LIMIT $gal_num_rows");



while ($gallery = $db->fetch_array($thumbs))
{
eval('$latestgallery .= "' . fetch_template('gallery_latestpictures') . '";');
}

}
// #################### Random Gallery-Additions #######################
// fetch the permissions for each forum
if ($vbulletin->options['show_random']) {
$random_thumbs = $db->query_read("SELECT gallery, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1'AND ". TABLE_PREFIX . "thread.featured!='1' AND  ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ." ORDER BY RAND() LIMIT $gal_num_rows");

while ($rand_gallery = $db->fetch_array($random_thumbs))
{
eval('$random_gallery .= "' . fetch_template('gallery_randompictures') . '";');
}

}
$top5 = $db->query_read("SELECT gallery,". TABLE_PREFIX . "thread.featured, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline, ". TABLE_PREFIX . "thread.views FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1' AND ". TABLE_PREFIX . "thread.featured!='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ." ORDER BY ". TABLE_PREFIX . "thread.views DESC LIMIT $gal_num_rows");

while ($top_gallery = $db->fetch_array($top5))
{
eval('$top5_gallery .= "' . fetch_template('gallery_top5') . '";');
}

// featured forum

$feat_rows=$gal_feat_rows;
$featured_thumbs = $db->query_read("SELECT ". TABLE_PREFIX . "thread.featured, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, MAX(". TABLE_PREFIX . "attachment.attachmentid)AS attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE ". TABLE_PREFIX . "thread.featured='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ."
GROUP BY ".TABLE_PREFIX ."thread.threadid
ORDER BY ". TABLE_PREFIX . "attachment.attachmentid DESC LIMIT $feat_rows");



while ($featured = $db->fetch_array($featured_thumbs))
{
eval('$featured_gallery .= "' . fetch_template('gallery_featured') . '";');
}

This will remove two queries, if those gallery-options are not used. Tell me, if it works, and i'll build up the whole plugin this way. This is just a workaround, no final solution for this problem. But it may help a bit.


Hi there - I tried this and it adds 4 queries to my forumhome - does that sound right?

Harald_T 07-09-2006 10:49 AM

O.k., if it does so, it should be right. I'll post another code later, which will only do the queries, which are really used.

I'm working on this routine, so it will only use one query. But atm it doesn't work right.

Harald_T 07-09-2006 02:25 PM

I would suggest, if you don't need the featured-option, use this code:

Code:

// #################### Latest Gallery-Additions #######################
// fetch the permissions for each forum
// global $vbulletin;
if ($vbulletin->options['show_latest']) {
$gal_num_rows = $vbulletin->options['gal_num_rows'];


$thumbs = $db->query_read("SELECT gallery, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ."
GROUP BY ".TABLE_PREFIX ."thread.threadid
ORDER BY ". TABLE_PREFIX . "attachment.attachmentid DESC LIMIT $gal_num_rows");



while ($gallery = $db->fetch_array($thumbs))
{
eval('$latestgallery .= "' . fetch_template('gallery_latestpictures') . '";');
}

}
// #################### Random Gallery-Additions #######################
// fetch the permissions for each forum
if ($vbulletin->options['show_random']) {
$random_thumbs = $db->query_read("SELECT gallery, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1'AND ". TABLE_PREFIX . "thread.featured!='1' AND  ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ." ORDER BY RAND() LIMIT $gal_num_rows");

while ($rand_gallery = $db->fetch_array($random_thumbs))
{
eval('$random_gallery .= "' . fetch_template('gallery_randompictures') . '";');
}

}

This is only a temporarily solution, as i said, i'm writing a new code for this.

Tanya123 07-09-2006 03:02 PM

My Admins and my Super Mods can see the gallery but my Mods and registered members and custom groups cannot see them. They get red X's. I setup the permission for them to see but still nothing. :(

Harald_T 07-09-2006 03:50 PM

@Tanya: Can your users download attachments? Could be this.

whoopass 07-09-2006 05:25 PM

Is it possible to show the gallery on the vbportal page?


All times are GMT. The time now is 10:56 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02227 seconds
  • Memory Usage 1,899KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete