PDA

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



Pages : [1] 2 3 4 5

KW802
06-03-2005, 02:08 PM
This module is for displaying vBa Gallery thumbnails on your CMPS 2.x pages.

Step #1: Modify {forums}/includes/vba_cmps_include_template.php

Look for:
$phrasegroups = array_merge($phrasegroups,
array(
'calendar',
'adv_portal',
'postbit'
)
);... and replace with:
$phrasegroups = array_merge($phrasegroups,
array(
'calendar',
'adv_portal',
'adv_gallery',
'postbit'
)
);Look for:
$specialtemplates = array_merge($specialtemplates,
array(
'adv_modules',
'adv_portal_opts',
'adv_portal_page',
'attachmentcache',
'bbcodecache',
'birthdaycache',
'eventcache',
'iconcache',
'maxloggedin',
'rankphp',
'smiliecache',
'userstats'
)
);... and replace with:
$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'
)
);

Step #2: Create a new template named "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/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]</strong></a>
</span>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_gallery_random" style="$vbcollapse[collapseobj_forumhome_gallery_random]">
<tr>$randomimagebits</tr>
</tbody>
</table>
<br />


Step #3: Upload the attached file to your {forums}/modules folder

Step #4: Create a new module

Module Title = Random Gallery
Column = {your choice}
Active = Yes
File to Include = gallery_random.php
Templates Used = adv_portal_gallery_random, adv_gallery_imagebit

[i]Please note: A newer version of this module will be released shortly. This version is really meant as a quick solution for those people who will be upgrading from CMPS 1.x to this new version. The new version will take advantage of some of the CMPS 2.x features. :)

ConqSoft
06-03-2005, 02:12 PM
Where's the .module file so I can just upload it? ;)

Our Sponsors
 

KW802
06-03-2005, 02:18 PM
Where's the .module file so I can just upload it? ;)Read the last part. :p

Brian
06-03-2005, 04:09 PM
Where's the .module file so I can just upload it? ;)
It's going to be so nice once 2.0 has been out for a few weeks or so and this forum is filled with .module files. :D

Our Sponsors
 

ConqSoft
06-03-2005, 04:55 PM
But a module like this will still require manual PHP changes, right? Or can it be done without requiring those?

(Also, did you add .module as an allowed attachment type? :D )

LEAD_WEIGHT
06-03-2005, 05:00 PM
Does this belong in Add-On Modules or Hacks & Other Modifications

Brian
06-03-2005, 05:18 PM
But a module like this will still require manual PHP changes, right? Or can it be done without requiring those?

(Also, did you add .module as an allowed attachment type? :D )
Just the changes to the /includes/vba_cmps_include_template.php file. The rest of the stuff will be handled with the .module file. And I just added .module files to the allowed extensions. :)

KW802
06-03-2005, 05:19 PM
But a module like this will still require manual PHP changes, right? Or can it be done without requiring those? Yes & no. The new version won't require anybody to modify the module's PHP anymore but they'll still have to do the one-time changes to the includes file to pick up the templates.


(Also, did you add .module as an allowed attachment type? :D )Good thought!

tomshawk
06-03-2005, 05:22 PM
Man, this version looks awesome brian.

I cant believe there is an addon module already http://www.redshift.com/%7Etomshawk/images/roflmao.gif

Kuddos

Keep up the great work ;)

mholtum
06-03-2005, 05:24 PM
I must be in retard mode today.. What exactly does this do? I already have a random thumb display on my portal and on my forumhome, where does this display them? On the custom pages? Or does this replace the one I have?

KW802
06-03-2005, 05:33 PM
I must be in retard mode today.. What exactly does this do? I already have a random thumb display on my portal and on my forumhome, where does this display them? On the custom pages? Or does this replace the one I have?

I guess I should've explained..... :p In step #1 above those changes were made to your "global.php" file which means if somebody upgrades from CMPS 1.x to CMPS 2.x and removes the code per the upgrade instructions then your random Gallery module will come to a crashing halt. Now in step #1 the changes are made to a CMPS 2.x only file. I have a new shiny version of the Gallery module being worked on that takes advantage of CMPS 2.x but in the meantime I needed to get the above instructions out there so that people using the old version of the random gallery file can upgrade to CMPS 2.x and still be able to use the module.

In a nutshell: If you currently use a random/newest/whatever version of the Gallery module with CMPS 1.x then it will stop working when you upgraded to CMPS 2.x unless you do step #1 above. :)

mholtum
06-03-2005, 05:43 PM
Mine works... :) and I didnt do any of that. Oh well. I guess I am blessed.

KW802
06-03-2005, 05:58 PM
Mine works... :) and I didnt do any of that. Oh well. I guess I am blessed.That means you didn't do step #1 of the upgrade instructions. :p

mholtum
06-03-2005, 06:28 PM
Step 1:


1). Upload the new files that came with this package over your existing ones.
2). Go to http://yoursite.com/forum/admincp/vbagallery_install.php in your browser and select the option to upgrade.


Yes I did, or I wouldnt be running it. ;) I just went through and rechecked to see if I missed any edits and nope. odd

ConqSoft
06-03-2005, 06:30 PM
If you uploaded all the files, you would get an error until you re-do those file changes. (I know, because it happened to me after I upgraded to RC1.)

Sounds like you didn't upload the new /includes/vba_cmps_include_template.php that comes with CMPS 2.0.

Brian
06-03-2005, 06:34 PM
Step 1:


Yes I did, or I wouldnt be running it. ;)
They were referring to the upgrade instructions for vBa CMPS, not the gallery. ;)

mholtum
06-03-2005, 06:35 PM
everything was uploaded...

Brian
06-03-2005, 06:36 PM
1). In your forum/global.php file:

Find:

if (defined('VBA_PORTAL'))
{
$phrasegroups = array_merge($phrasegroups,
array(
'calendar',
'adv_portal',
'postbit'
)
);

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

$globaltemplates = array_merge($globaltemplates,
array(
'adv_portal',
'adv_portal_footer'
)
);
}
Replace With:

if (defined('VBA_PORTAL'))
{
require_once('./includes/vba_cmps_include_template.php');
}
;)

mholtum
06-03-2005, 06:41 PM
Brian, isnt that what you fixed for me via a trouble ticket?

Brian
06-03-2005, 06:49 PM
Actually, I think I had assumed that you already made the changes to your global.php file and were just having problems with the vba_cmps_include_template.php file. Since I still have your ticket open though I went ahead and made that change to your global.php file for you as well.

mholtum
06-03-2005, 07:01 PM
and the random images still work. Unless you did that as well? Thanks BTW.

ConqSoft
06-05-2005, 12:04 AM
Kevin,

Does this have the permissions fix in it?

KW802
06-05-2005, 02:09 AM
Kevin,

Does this have the permissions fix in it?Yep. The attached file is the exact module I'm using on my site with a few minor exceptions.

tmhall
06-06-2005, 03:12 PM
Maybe you should make a note in the OP that only step 1 is necessary for those of us who had it installed previously and just upgraded to CMPS 2.0.

Also, you have all the $showfields set to 1 but they're 0 (and commented out) by default. You might want to change that or the comments in the file, since it still says to remove the slashes if you don't want to see the fields. :)

phoenixdown
06-08-2005, 12:12 AM
Thank you for updating. Out of curiosity, any eta for the .module file?

tmhall
06-08-2005, 12:15 AM
Oops, how rude of me...

Sorry I gave you advice without thanking you for this fix, Kevin. Thanks! :)

ConqSoft
06-09-2005, 12:03 PM
If you use this module in the same column as your "Current Poll", it will cause the Poll to break.

Here's the fix:
http://www.vbadvanced.com/forum/showpost.php?p=46130&postcount=6

KW802
06-09-2005, 12:34 PM
If you use this module in the same column as your "Current Poll", it will cause the Poll to break.

Here's the fix:
http://www.vbadvanced.com/forum/showpost.php?p=46130&postcount=6 Have you tried it with the attached module yet? I added the "unset($option);" into the PHP code for that reason.

ConqSoft
06-09-2005, 12:35 PM
Ah, nope, I didn't. Cool. :)

offline
06-12-2005, 05:12 PM
I upgraded to the new version of cmps & gallery, look at my output if I have 3 or more pictures... http://www.livingreefs.com How do I get them to tile to another line say if I wanted to display 12 pictures?

I added a second <tr>$randomimagebits</tr> which now displays a second line but it displays the same pictures as the first line. Im just trying to figure it out. :)

corriewf
06-14-2005, 10:58 PM
Ok its been a while since I installed the first version but how do you get more then one image?

cgmojoco
06-14-2005, 11:45 PM
How would I modify this so that I can show the newest images rather than random images.

Also, how far along are you in getting the cpms 2.0 version working? (as opposed to the legacy version)

Thank you in advance?

Stachel
06-17-2005, 12:32 AM
Dumb question: What does "legacy version" mean?

I have the latest versions of each CMPS 2.x and vbGallery 1.0.1

This is for an older version of.... ?

Is that like legacy postbit format?

tmhall
06-17-2005, 12:40 AM
It just means that this is the same as the old version, but tweaked to work with CMPS 2.0. Eventually he plans to release a new version that takes more advantage of the new features of CMPS 2.0.

Stachel
06-17-2005, 07:50 AM
Thanks tmhall !

corriewf
06-17-2005, 11:35 AM
Ok its been a while since I installed the first version but how do you get more then one image?

Anyone?

cgmojoco
06-22-2005, 08:35 AM
I'm having trouble getting this module to work, initially I had TWO HEADERS for the module!

I had to manually remove the header in the template.

Now I am noticing that the module is ruining the format of my homepage columns:
http://frenchbulldogusa.com/

Notice how the today's Birthday's and stats modules are not formatted correctly (taking up the entire page at the bottom). When I turn off the random gallery module all returns to normal.

Also, when I save the module settings I receive this error in the admincp (it flashes real quick but I captured a screenshot):
Warning: Invalid argument supplied for each () in /includes/adminfunctions_vba_cmps.php on line 634

EDIT*****
Nevermind....I deleted all of the code in the template but:

<tr>$randomimagebits</tr>

And that did the trick!

cgmojoco
06-24-2005, 06:04 PM
Would anyone care to edit the code to allow for a random normal size picture to be displayed in the module? (rather than a thumbnail specifically)

EDIT****
Also, how do I get more than one image?

Mattius
06-30-2005, 12:19 AM
I have no idea why, but im not gettin the random image display at all. I have cmps2.x installed and followed this instructions. Not getting any error, just gettin no module to display at all..

Btw i have checked the permissions, and atm it allows every usergroup to view it and it still doesnt display...

Sanjiyan
06-30-2005, 02:28 PM
Great addon, two questions:

How to a make a 'latest' image box? You managed to make one for me for version 1 of the CMPS, also how do I make the description field of the imagebit to be centered (ie the text in the description box) at the moment, the image is center, the box with the description is center, but the text within the box is not centered, its left alligned, ie the image title, the other info like username etc is fine as it is (left alligned)

corriewf
06-30-2005, 04:46 PM
Would anyone care to edit the code to allow for a random normal size picture to be displayed in the module? (rather than a thumbnail specifically)

EDIT****
Also, how do I get more than one image?


Yes more then one image anyone?

Sanjiyan
07-03-2005, 07:35 AM
Anyone got any ideas on the newest image block ie like what was made for the 1.0.1 CMPS addon?

NetRover
07-03-2005, 10:57 PM
Hi there, I thought I done everything right and it all seems to work with image on the right.

If the gallery block is at the bottom it's fine, If I have anything below the image block everything below breaks into full width.

I'm sure it's something simple.

It also looks like it has two random gallery headers.

When adding module I was asked for an identifier which I was not sure of and entered "random" if that has done anything.

ConqSoft
07-03-2005, 11:46 PM
Hi there, I thought I done everything right and it all seems to work with image on the right.

If the gallery block is at the bottom it's fine, If I have anything below the image block everything below breaks into full width.

I'm sure it's something simple.

It also looks like it has two random gallery headers.

When adding module I was asked for an identifier which I was not sure of and entered "random" if that has done anything.

If you're using the CMPS 2 template shell, all you need in the gallery template is:

$randomimagebits

NetRover
07-04-2005, 07:01 AM
Thanks very much, excellent working a treat now.

Sanjiyan
07-04-2005, 09:15 AM
I have tried to alter the random image .php file so that it shows the newest image...

But it does not seem to work, I have attached the modified .php file to see if anyone can understand it and see how to make it work. It does not even show the block on the webpage either, even though the module is enabled.

Anyway, if anyone is able to help with this I'd be greatful.

The template I use is:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2">
<span class="smallfont"><strong>$vba_options[portal_blockbullet] <a href=" $vboptions[homeurl]/gallery/index.php">$mods[title]</strong></a>
</span>
</td>
</tr>
</thead>
<tr>$newimagebits</tr>
</tbody>
</table>
<br />

and it is called: adv_portal_gallery_newest

For the module itself, it uses the following templates:

adv_portal_gallery_newest
adv_gallery_imagebit

mholtum
07-08-2005, 08:15 PM
Ok, just upgraded to CMPS RC2 and had to run this to get my images to show. However I cant get the description to go away.



// If you DON'T want of these fields to show then unremark
// the line in question by removing the "//" in the front it.
//$showfields['description'] = 1;
//$showfields['rating'] = 1;
//$showfields['user'] = 1;
//$showfields['dateline'] = 1;
//$showfields['views'] = 1;
//$showfields['dimensions'] = 1;
//$showfields['filesize'] = 1;
//$showfields['posts'] = 1;
//$showfields['lastpost'] = 1;


and if I choose more than one image they are next to each other instead of underneath each other. What am I missing?

ConqSoft
07-08-2005, 08:18 PM
The "underneath each other" was a hack of the original hack that Kevin posted in that same old thread. It should work with this one; maybe.

mholtum
07-08-2005, 08:30 PM
Oh well, I cant seem to find it. Also, I now have a line running down the left hand side of the image that wasnt there prior..

mholtum
07-08-2005, 09:40 PM
http://www.vbadvanced.com/forum/showpost.php?p=20526&postcount=8 Found it.. Also fixed my line issue