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)
-   -   Module CMPS: PhotoPost vBGallery (https://vborg.vbsupport.ru/showthread.php?t=98982)

Zachariah 11-04-2005 12:51 PM

Quote:

Originally Posted by gator777
PHP Code:

Parse errorparse errorunexpected ',' in /hsphere/local/home/mysite.net/vb3/modules/gallery_random.php on line 6 


I'll take a look, might of missed something.

my mistake :o ? :tired:

// Useage: $catlimit = '3,5,10,30,70';

needs single quotes if there is more than 1 Cat.

<else>

// Useage: $catlimit = 5;


On a brighter note.
- Adding exclude option.
- perhaps other things
:bunny::

gator777 11-04-2005 04:08 PM

Quote:

Originally Posted by Zachariah
I'll take a look, might of missed something.

my mistake :o ? :tired:

// Useage: $catlimit = '3,5,10,30,70';

needs single quotes if there is more than 1 Cat.

<else>

// Useage: $catlimit = 5;


On a brighter note.
- Adding exclude option.
- perhaps other things
:bunny::

That fixed it. :)

Thanks again for a wonderful block/code. :)
I also downloaded your "Top Posters" block as well and it works great. :)

good2laugh 11-04-2005 05:16 PM

Quote:

Originally Posted by Zachariah
trueinnovation - Thank You.

- People that are having problems please Beta the Change. If it works I will update the Zip.

modules/gallery_random.php

Got it...

Change this (around line 83):

Code:

foreach ($gallery_permissions["$usergroupid"] AS $option => $value)
        {
                if (($option == 'gallery_maxcats' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['cancreatecategories'])) OR ($option == 'gallery_maxdiskspace' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['canuploadimages'])))
                {
                        continue;
                }
                if (((($value > $galleryperms["$option"] AND $galleryperms["$option"] != '0') OR !$value) AND $option != 'gallery_perms'))
                {
                        $galleryperms["$option"] = $value;
                }
        }

to this:

Code:

if (!empty($gallery_permissions["$usergroupid"]))
        {

        foreach ($gallery_permissions["$usergroupid"] AS $option => $value)
        {
                if (($option == 'gallery_maxcats' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['cancreatecategories'])) OR ($option == 'gallery_maxdiskspace' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['canuploadimages'])))
                {
                        continue;
                }
                if (((($value > $galleryperms["$option"] AND $galleryperms["$option"] != '0') OR !$value) AND $option != 'gallery_perms'))
                {
                        $galleryperms["$option"] = $value;
                }
          }
}



Glad I read the whole thread before crying out for help. This works for me, Thank you. Installed.

Zachariah 11-04-2005 05:55 PM

Quote:

Originally Posted by good2laugh
Glad I read the whole thread before crying out for help. This works for me, Thank you. Installed.

OK, I'll add to the main file ASAP.

dug320 11-04-2005 07:19 PM

This is a great hack.

It works!

The only problem to date is that I cannot edit the module on any page. It is either on or off throughout.

Zachariah 11-04-2005 10:33 PM

Quote:

Originally Posted by dug320
This is a great hack.

It works!

The only problem to date is that I cannot edit the module on any page. It is either on or off throughout.

Its not that Advanced yet :) - will be soon.

Settings are in: gallery_random.php @ the moment.

jenciso 11-06-2005 01:56 AM

Quote:

Originally Posted by trueinnovation
to this:

if (!empty($gallery_permissions["$usergroupid"]))
{
foreach ($gallery_permissions["$usergroupid"] AS $option => $value)
{
if (($option == 'gallery_maxcats' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['cancreatecategories'])) OR ($option == 'gallery_maxdiskspace' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['canuploadimages'])))
{
continue;
}
if (((($value > $galleryperms["$option"] AND $galleryperms["$option"] != '0') OR !$value) AND $option != 'gallery_perms'))
{
$galleryperms["$option"] = $value;
}
}
}

Thanks! That fixed my problem too!

dug320 11-06-2005 06:35 AM

Great Hack. Can't wait for more control :rolleyes: :rolleyes:

jenciso 11-06-2005 03:00 PM

hmmm, I still have one problem.

For unregistered users, the Image Gallery shows up empty, but once I log in it works fine.

I checked my gallery and unregistered users can view thumbnails and previews just fine. I checked my module/gallery permissions and all of them are set correctly.

Any help on this would be appreciated.

Edit:
I did more digging and logged on as another user. Apparently, the thumbnails show up only when I have a user assigned to a user group:

https://vborg.vbsupport.ru/external/2005/11/3.gif

For those who are not assigned to any groups or for unregistered users, no thumbnails show.

Sychev_S 11-06-2005 05:53 PM

how to change the size of a thumbnail displayed only in the module window?


All times are GMT. The time now is 06:49 PM.

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.01403 seconds
  • Memory Usage 1,755KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (6)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
  • (10)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