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)

divided_by_fear 10-31-2005 12:05 PM

yeah its all cached now lol i didnt have adv_gallery_imagebit on the Templates Used cause i just went by the installer didnt even look lol but once i added adv_portal_gallery_random,adv_gallery_imagebit to the Templates Used it worked like a charm...

InsaneContender 10-31-2005 06:08 PM

I was wondering, is it possible to EXCLUDE one and only one category from being displayed? I have a category that I can only see so I can upload pictures to it for my news posts, but it is still being displayed in the latest images block. Any way to take care of that?

trueinnovation 10-31-2005 07:09 PM

Great mod, but I get the same error as phifou and Serenity. Anyone have a solution?

Much appreciated.

Quote:

Originally Posted by phifou
It runs nice but I have an error warning at the top of CPMS, like Serenity :

"Warning: Invalid argument supplied for foreach() in /modules/gallery_random.php on line 83"

and my line 83 is


and its happens with no link with usergroups (admin, member, visitors ...)

I also noticed that the module disturbed tables width ... where can the width of table of the module can be tuned ?


trueinnovation 10-31-2005 07:31 PM

Got it...

Change this (around line 83):

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:

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;
}
}
}

trueinnovation 10-31-2005 07:54 PM

Help! I want unregistered users to see these random images on the CMPS. Ive set unregistered=YES in the module, but this module still does not appear.

Is this because my gallery itself is blocked to unregistered users? If so, how can I mod this hack to show the random images on CMPS even tho' my gallery access is restricted? e.g. I want my home page to show what could be accessed, if they registered/subscribed...

Advice appreciated...

Zachariah 10-31-2005 08:32 PM

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;
                }
          }
}


Zachariah 10-31-2005 08:35 PM

Quote:

Originally Posted by trueinnovation
Help! I want unregistered users to see these random images on the CMPS. Ive set unregistered=YES in the module, but this module still does not appear.

Is this because my gallery itself is blocked to unregistered users? If so, how can I mod this hack to show the random images on CMPS even tho' my gallery access is restricted? e.g. I want my home page to show what could be accessed, if they registered/subscribed...

Advice appreciated...

You can set guests to see thumbnails / make them REG to see large images. If they look @ your gallery, they can see all the thumbs just not large image.

Mijae 11-01-2005 03:36 PM

Quote:

Originally Posted by Zachariah
You can set guests to see thumbnails / make them REG to see large images. If they look @ your gallery, they can see all the thumbs just not large image.

Well, I have it set so everyone can see the gallery, but guests don't get the image gallery module on the index page.

Why?

Edit: Also, if I hash out catlimit, it won't show anything, and if I set more then one (catlimit = 2,3,4;), it will return a parse error. How can I make it pull images only from the categories I want it to?

phifou 11-02-2005 03:37 PM

TRUEINNOVATION 's hack runs beautifully. Thanks a lot.

gator777 11-04-2005 04:04 AM

You spent a lot of time coding this hack, so I wanted to take the time to thank you for all your hard work. This block works great, and I finf it the single most important block on my site. It pulls visitors into the gallery and is very important.

I do have one quesiton though. I followed this as I understood it:

PHP Code:

// If you HASH out "$catlimit" images will pull from all categories.
// Useage: $catlimit = 3,5,10,30,70; 

// $catlimit = 3; 

But when I tried to add another "gallery ID" to "$catlimit = 3,7;" (for example) , I got the following error code dipsplayed on the browser:

PHP Code:

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

Thanks again for the wonderful code. :D


All times are GMT. The time now is 06:45 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.01365 seconds
  • Memory Usage 1,757KB
  • 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
  • (2)bbcode_php_printable
  • (3)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