defcon_420
04-29-2006, 10:00 PM
This is my first mod, i am not a programmer but i'll try to give support IF i can.
This mod is to display a random photo from Menalto Gallery 2.1 in vBadvanced 2.1
READ ME
For this hack to work you must have both Menalto Gallery 2.1 and vBadvanced CMPS 2.1 installed
This installation assumes that your vBulletin install is in your webroot and your gallery install is in /gallery2/" If they are not you will have to change the path's yourself as only you know where you have installed them.
Installation
Step 1.
Open randomcmps.php replacing the CAPS with your domain information and path to main.php in your gallery directory, save and upload this file into your webroot.
<head><link rel="stylesheet" href="http://www.YOURDOMAIN.COM/GALLERY2/main.php?g2_controller=imageblock.ExternalCSS&g2_f rames=wood"/></head>
<?php
@readfile('http://www.YOURDOMAIN.COM/GALLERY2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=fullSize&g2_show=title');
?>
Step 2.
Edit the plugin randomcmps-plugins.xml replace the CAPS with your domain information and save
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="adv_cmps">
<title>Random Gallery Photo in Portal</title>
<hookname>global_start</hookname>
<phpcode><![CDATA[ob_start();
include('http://www.YOURDOMAIN.com/randomcmps.php');
$includedrg = ob_get_contents();
ob_end_clean();]]></phpcode>
</plugin>
</plugins>
Step 3
AdminCP> Plugin System> Download/Upload Plugins> Browse> find randomcmps-plugins.xml and import make sure the plugin is active after importing
Step 4
AdminCP> Styles and Templates > Style Manager > Add New Template >
TITLE:
adv_portal_newrandomgallery2
TEMPLATE
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet]Gallery</strong></span></td>
</tr>
</thead>
<tr>
<td class="$getbgrow" width="100%" align="center">
$includedrg
</td>
</tr>
</table>
<br />
PRESS SAVE AND RELOAD
Step 5
AdminCP > vBa CMPS> Add Module> Template>
Title: gallery2
column: YOUR CHOICE
display order: 0 but u can put it where u want it
Active: Yes
Template to include: newrandomgallery2
module shell template options: no
Set the usergroups u want to see it and save
Step 6
AdminCP> vBa CMPS> Edit Pages
check "gallery 2" in the Modules Enabled box for the pages you want the random photo to display in and save
KNOWN ISSUE ONLY EFFECTS EMBEDDED MODE:
If Gallery2.1 is running in embed mode and a user clicks the random photo in vBadvanced they user is directed to the non embedded gallery.
As i am not a programmer any improvements or help with this or other issues would be gratefully accepted
DISCLAIMER:
This hack maybe chop up, torn up, thrown out, spit on, ripped up or modified in any way you see fit as long as it dont involve me getting into trouble. USE AT YOUR OWN RISK
This mod is to display a random photo from Menalto Gallery 2.1 in vBadvanced 2.1
READ ME
For this hack to work you must have both Menalto Gallery 2.1 and vBadvanced CMPS 2.1 installed
This installation assumes that your vBulletin install is in your webroot and your gallery install is in /gallery2/" If they are not you will have to change the path's yourself as only you know where you have installed them.
Installation
Step 1.
Open randomcmps.php replacing the CAPS with your domain information and path to main.php in your gallery directory, save and upload this file into your webroot.
<head><link rel="stylesheet" href="http://www.YOURDOMAIN.COM/GALLERY2/main.php?g2_controller=imageblock.ExternalCSS&g2_f rames=wood"/></head>
<?php
@readfile('http://www.YOURDOMAIN.COM/GALLERY2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=fullSize&g2_show=title');
?>
Step 2.
Edit the plugin randomcmps-plugins.xml replace the CAPS with your domain information and save
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="adv_cmps">
<title>Random Gallery Photo in Portal</title>
<hookname>global_start</hookname>
<phpcode><![CDATA[ob_start();
include('http://www.YOURDOMAIN.com/randomcmps.php');
$includedrg = ob_get_contents();
ob_end_clean();]]></phpcode>
</plugin>
</plugins>
Step 3
AdminCP> Plugin System> Download/Upload Plugins> Browse> find randomcmps-plugins.xml and import make sure the plugin is active after importing
Step 4
AdminCP> Styles and Templates > Style Manager > Add New Template >
TITLE:
adv_portal_newrandomgallery2
TEMPLATE
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet]Gallery</strong></span></td>
</tr>
</thead>
<tr>
<td class="$getbgrow" width="100%" align="center">
$includedrg
</td>
</tr>
</table>
<br />
PRESS SAVE AND RELOAD
Step 5
AdminCP > vBa CMPS> Add Module> Template>
Title: gallery2
column: YOUR CHOICE
display order: 0 but u can put it where u want it
Active: Yes
Template to include: newrandomgallery2
module shell template options: no
Set the usergroups u want to see it and save
Step 6
AdminCP> vBa CMPS> Edit Pages
check "gallery 2" in the Modules Enabled box for the pages you want the random photo to display in and save
KNOWN ISSUE ONLY EFFECTS EMBEDDED MODE:
If Gallery2.1 is running in embed mode and a user clicks the random photo in vBadvanced they user is directed to the non embedded gallery.
As i am not a programmer any improvements or help with this or other issues would be gratefully accepted
DISCLAIMER:
This hack maybe chop up, torn up, thrown out, spit on, ripped up or modified in any way you see fit as long as it dont involve me getting into trouble. USE AT YOUR OWN RISK