PDA

View Full Version : [CMPS 2.x] vBa Gallery Module [Legacy version]



Pages : 1 [2] 3 4 5

Blackhat
07-11-2005, 10:00 AM
I get these errors:
Warning: Invalid argument supplied for foreach() in /modules/gallery_random.php on line 33

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

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

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

grassiekuik
07-15-2005, 05:55 AM
My layout seems to be out of order after i made this one? I can see the picture but unfortunatly all the rest is place somewhere else

edit: it sounds like the post above but i think it's different

Our Sponsors
 

ConqSoft
07-16-2005, 11:58 PM
Ok, how long before there's a vB 3.5 version of this? :D

LEAD_WEIGHT
07-17-2005, 12:10 AM
When u see vb3.5 go gold then u can ask? :D

Our Sponsors
 

ConqSoft
07-17-2005, 12:13 AM
Nah.. Gallery is already working fine, so this module should follow shortly. :)

eViL_sTiGmA
07-17-2005, 01:19 PM
Well, i wanted to use this module, i love it, but i have a lil problem, i get 2 headers and my index looks deformed.

How can i fix that???

I did everything like KW802 said...

grassiekuik
07-18-2005, 05:56 PM
no-one for the layout problem?

KW802
07-18-2005, 06:06 PM
I did everything like KW802 said...In that case.... one of us missed something. Most likely me. :p

Go into the new module you created and look for the option "Use Module Shell Template" (it'll be in a section called Module Shell Template Options) and make sure that it is turned off ("No"). If that is turned on and you use the template as-is in the instructions then you'll get a 'module in a module' type look like your screen shot shows.

grassiekuik
07-19-2005, 05:24 AM
that did the trick for me. Tnx

euca
07-19-2005, 08:18 PM
Does this module work in vb3.5 + CMPS 2.0 ?

ConqSoft
07-19-2005, 08:20 PM
Does this module work in vb3.5 + CMPS 2.0 ?

No, see post #53 above. :)

ConqSoft
07-21-2005, 12:37 AM
Ok, how long before there's a vB 3.5 version of this? :D

Come on Kevin, you can DOOOOOO it! ;)

KW802
07-21-2005, 12:52 AM
I'm still working on this..... :)

I got side-tracked with another hack that'll hopefully be released tommorow (it's a combination of two other Gallery hacks I did but haven't updated for some time now ;) ).

The new version "module" version of the random gallery module is taking longer than usual because I'm trying to make the code as independent as possible so it'll use it's own templates, etc. instead of piggybacking on the default templates. That way changes to the module template can be done pretty easily. I'm also trying to take into account all of the various revisions people had request from the old version (eg: displaying in a column or a row, number of thumbs to include, turn off/on fields to display, etc.).

Father Time just hasn't been kind to me lately. :(

blkatt
07-24-2005, 12:21 PM
Nice hack. I just have a couple of minor issues though.

On my VBadvanced Home page Random Gallery, I want to eliminate certain Imagebit Fields , In other words, I only want to show author and title.

I know how to change the Imagebit Fields on the main Gallery page in the adminCP , it works fine, but the setting changes are ignored in my Random Gallery Module on my home page.

Not only that, but even though my random images are set to 3 images - the Random Gallery on the Home Page only shows 1 image. On the main Gallery page, 3 images show just fine.

I am using VB CMPS v.2.0 RC2 &
Gallery v.1.0.1


Please assist.

Thanks.

blkatt
07-26-2005, 10:52 AM
Nice hack. I just have a couple of minor issues though.

On my VBadvanced Home page Random Gallery, I want to eliminate certain Imagebit Fields , In other words, I only want to show author and title.

I know how to change the Imagebit Fields on the main Gallery page in the adminCP , it works fine, but the setting changes are ignored in my Random Gallery Module on my home page.

Not only that, but even though my random images are set to 3 images - the Random Gallery on the Home Page only shows 1 image. On the main Gallery page, 3 images show just fine.

I am using VB CMPS v.2.0 RC2 &
Gallery v.1.0.1


Please assist.

Thanks.

Never mind. I did not realize I had to edit the gallery.random.php file to effect these changes mentioned in my quote above. For those like novices like me, you must edit this file.

ConqSoft
07-27-2005, 08:01 PM
Here's a gallery_random.php that works with vBulletin 3.5.

KW802
07-27-2005, 08:06 PM
Cong, what changes did you?

ConqSoft
07-27-2005, 08:08 PM
Cong, what changes did you?


At the top, changed to this:



// Get our category & options caches
$categorycache = unserialize($vbulletin->gallery_c_cache);
$galleryoptions = unserialize($vbulletin->adv_gallery_opt);
$gallery_permissions = unserialize($vbulletin->gallery_ugroups);


Start of query changed to this:


$getrand = $db->query_read("


All references to the DB changed to this:


$db->


I think that was it.

ConqSoft
07-27-2005, 08:11 PM
Hmm. The links to the Original Image size and dimensions aren't there. They just link to the root of the site. (They work for the Resized Image, just not the Original)

Did that work before? Don't know that I ever tried those links on vB 3.0.x.

ConqSoft
07-27-2005, 08:18 PM
I also just now added:



$adv_sorturl = '&catid=' . $images['catid'];


Right above:


$randomimagebits .= construct_imagebits($images);


So that it keeps the catid, like in the regular gallery.

ConqSoft
07-27-2005, 08:19 PM
Still don't see the problem with the Original Image links though. Hmm.

ConqSoft
07-27-2005, 08:35 PM
Ah-Ha! Fixed it. Updated attachment above.

Had to change:


while ($images = $db->fetch_array($getrand))


To:


while ($images = $vbulletin->db->fetch_array($getrand))

FD929
07-30-2005, 12:38 PM
Good stuff, thanks for the update Conq. :)
http://www.530riders.net/

hugo
08-01-2005, 11:05 AM
I get these errors:
Warning: Invalid argument supplied for foreach() in /modules/gallery_random.php on line 33

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




Although i re-install the module,I i got the same warnings.

I actually have vbulletin 3.08 and is a fresh install, could be becouse i have only 1 file on my galllery?


Thanks in advanced for your help.

Polo
08-01-2005, 02:52 PM
I'm getting this error in vbulletin 3.5
Warning: Invalid argument supplied for foreach() in /modules/gallery_random.php on line 49

Warning: array_keys(): The first argument should be an array in /includes/functions_gallery.php on line 427

Warning: Invalid argument supplied for foreach() in /includes/functions_gallery.php on line 427

Warning: Division by zero in /includes/functions_gallery.php on line 1134 can someone help me sort this problem out?

Polo
08-03-2005, 11:22 AM
anyone?

ConqSoft
08-03-2005, 11:24 AM
Are you running vBulletin 3.5 RC1? Are you using the latest gallery_random.php that I posted?

ConqSoft
08-03-2005, 11:24 AM
The error appears that you are running the gallery_random.php made for vBulletin 3.0, on 3.5.

Polo
08-03-2005, 11:25 AM
I'm using vbulletin 3.5 rc4.... and yes, I'm using the one you posted

ConqSoft
08-03-2005, 11:26 AM
There is no vBulletin 3.5 RC4.

Polo
08-03-2005, 11:32 AM
Are you running vBulletin 3.5 RC1? Are you using the latest gallery_random.php that I posted?
double checked... yes I'm using the one you posted...

Polo
08-03-2005, 11:33 AM
There is no vBulletin 3.5 RC4.
oh... sorry I'm using v3.5.0 Beta 4 that is what I meant..

ConqSoft
08-03-2005, 11:36 AM
Upgrade to RC1, or wait for RC2 and see if it works then.

Polo
08-03-2005, 12:13 PM
Upgrade to RC1, or wait for RC2 and see if it works then.
Ok I will... thanks conqsoft

Polo
08-03-2005, 03:34 PM
upgraded to rc1 and still having the same errors :(

Paulo
08-03-2005, 04:02 PM
I have mod the templates so that they are valided xhtml w3c and add collapse in module.

Template: adv_portal_gallery_newest



<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_gallery_newest')">
<img id="collapseimg_forumhome_gallery_newest" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0"/>
</a>
<span class="smallfont"><strong>$vba_options[portal_blockbullet]<a href=" $vboptions[homeurl]/gallery/index.php">$mods[title]</a></strong>
</span>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_gallery_newest" style="$vbcollapse[collapseobj_forumhome_gallery_newest]">
<tr>$newimagebits</tr>
</tbody>
</table>
<br />

Template: adv_portal_gallery_random



<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_gallery_random')">
<img id="collapseimg_forumhome_gallery_random" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0"/>
</a>
<span class="smallfont"><strong>$vba_options[portal_blockbullet]<a href=" $vboptions[homeurl]/gallery/index.php">$mods[title]</a></strong>
</span>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_gallery_random" style="$vbcollapse[collapseobj_forumhome_gallery_random]">
<tr>$randomimagebits</tr>
</tbody>
</table>
<br />

Polo
08-03-2005, 10:59 PM
what can I be doing wrong?

Paulo
08-04-2005, 04:29 AM
Just i little error in line title.
i change this:
</strong></a>
to
</a></strong>

Polo
08-04-2005, 11:01 AM
upgraded to rc1 however, the errors disapeared, but I cannot see anything on the front cmps... even though the block is active and the page has been setup to show the block... any ideas?

Polo
08-05-2005, 11:03 AM
anyone?

civicowners.com
08-07-2005, 11:13 AM
I installed it but here are some issues that I have:

I can't put any modules after random gallery. All modules are showing at the bottom after all blocks. How can I fix that? And how can I add more pics then 1?

Thanks

ConqSoft
08-07-2005, 11:20 AM
Change your random gallery template to ONLY contain the following, if you're using the random_gallery.php that I posted. Also, make sure you have the "Use Module Shell Template" option set to Yes. Sorry, forgot to mention that before.

adv_portal_gallery_random template should contain this ONLY:

$randomimagebits


The one I sent up it set up to show one image only, if you set it to do more, you'll have to play with the table cells to get it to look how you want.

Kevin said he was working on a true .module version of this, that may have more options as far as orientation, number of images to show, etc. Mine was just a patch to get it working on 3.5 on my site.

civicowners.com
08-07-2005, 11:34 AM
You mean I have to replace this code:


<?php

$phrasegroups = array_merge($phrasegroups,
array(
'calendar',
'adv_portal',
'adv_gallery',
'postbit'
)
);

$specialtemplates = array_merge($specialtemplates,
array(
'adv_modules',
'adv_portal_opts',
'adv_portal_page',
'attachmentcache',
'bbcodecache',
'birthdaycache',
'eventcache',
'iconcache',
'maxloggedin',
'rankphp',
'smiliecache',
'userstats',
'adv_gallery_opt',
'gallery_c_cache',
'gallery_ugroups'
)
);

$globaltemplates = array_merge($globaltemplates,
array(
'adv_portal',
'adv_portal_footer',
'adv_portal_nodisplay'
)
);

?>

To $randomimagebits ?

"Use Module Shell Template" option set to Yes before.

ConqSoft
08-07-2005, 11:35 AM
No, the TEMPLATE. (Step #2 of the original instructions.) Not the code changes.

civicowners.com
08-07-2005, 11:36 AM
Why is showing Random gallrey twice?
Random Gallery
Random Gallery

ConqSoft
08-07-2005, 11:36 AM
Why is showing Random gallrey twice?
Random Gallery
Random Gallery
Because the original Template included the title code, which the Template Shell now handles in CMPS 2.

civicowners.com
08-07-2005, 11:38 AM
But on your site Random Gallery Image shows only 1 time. BTW, nice site!

civicowners.com
08-07-2005, 11:40 AM
I think I fixed it.

civicowners.com
08-08-2005, 02:04 AM
OK so here's what I did:

I followed the instructions at http://www.vbadvanced.com/forum/showpost.php?p=20526&postcount=8

Also in the module change "LIMIT 1" to "LIMIT 4" to get the number that you want.
Sorry, in which module because I can't find LIMIT1

When I try to put more then 1 pic in random gallery, I get all pics the same. How can I fix it?

And last question: How to display pics horizontally? (now they are vertical)

Any help greatly appreciated!

PS: Figured out everything but just the horizontal position.

Polo
08-08-2005, 10:45 AM
can someone help me with my problem...