Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Menalto random gallery photo in vBa 2.1 Details »»
Menalto random gallery photo in vBa 2.1
Version: 1.00, by defcon_420 defcon_420 is offline
Developer Last Online: Jul 2007 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-29-2006 Last Update: Never Installs: 7
Uses Plugins Template Edits
Code Changes Additional Files Is in Beta Stage  
No support by the author.

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.

Code:
<head><link rel="stylesheet" href="http://www.YOURDOMAIN.COM/GALLERY2/main.php?g2_controller=imageblock.ExternalCSS&amp;g2_frames=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

Code:
<?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:

Code:
adv_portal_newrandomgallery2


TEMPLATE

Code:
<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>


Code:
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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-30-2006, 04:53 PM
defcon_420's Avatar
defcon_420 defcon_420 is offline
 
Join Date: Jun 2004
Location: next to you
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reserved
Reply With Quote
  #3  
Old 04-30-2006, 06:38 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man!
Reply With Quote
  #4  
Old 04-30-2006, 07:07 PM
nonamer69 nonamer69 is offline
 
Join Date: Nov 2005
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this module do multiple random photos in vertical or horizontal form? I would like to be able to put three random images going down the left column of my portal. is it possible? and how can I?

thanks bud,
Jerry
Reply With Quote
  #5  
Old 05-01-2006, 12:34 AM
defcon_420's Avatar
defcon_420 defcon_420 is offline
 
Join Date: Jun 2004
Location: next to you
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nonamer69
can this module do multiple random photos in vertical or horizontal form? I would like to be able to put three random images going down the left column of my portal. is it possible? and how can I?

thanks bud,
Jerry
The module can be in horizontal if you selected center rather than right option when adding the module to vBa, you may also select left and it will be vertical.
As far as i can see if you would like to pull 2 more photos from the random photo script in gallery2 (main.php) then you will need to add 2 new varibles to pull the information.

What you need to do is add 2 varibles to your plugin like this
Code:
ob_start();
   include('http://www.yourdomain.com/randomcmps.php');
   $includedrg = ob_get_contents();
ob_end_clean();
ob_start();
   include('http://www.yourdomain.com/randomcmps.php');
   $includedrg1 = ob_get_contents();
ob_end_clean();
ob_start();
   include('http://www.yourdomain.com/randomcmps.php');
   $includedrg2 = ob_get_contents();
ob_end_clean();
then add the varibles from within your adv_portal_newrandomgallery2 template
eg.
Code:
<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
<br>
$includedrg1
<br>
$includedrg2
</td>
</tr>
</table>
<br />
Reply With Quote
  #6  
Old 05-01-2006, 01:50 AM
nonamer69 nonamer69 is offline
 
Join Date: Nov 2005
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome, thank you defcon_420
Reply With Quote
  #7  
Old 05-01-2006, 03:21 PM
ztempuser ztempuser is offline
 
Join Date: Nov 2005
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

would it be easy to make it work with vbadvanced 2.0.0?
i just tried it but it gives global errors, i guess since it was made for 2.1.0
Reply With Quote
  #8  
Old 05-01-2006, 11:56 PM
defcon_420's Avatar
defcon_420 defcon_420 is offline
 
Join Date: Jun 2004
Location: next to you
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i really have no idea Blackwidow as i dont use vbadvanced 2.0
Its been tested and works on vbulletin 3.5.4, gallery 2.1 on vba 2.1

sorry i cant offer any support for vba 2.0 as i dont have it installed and have no test installation.
Reply With Quote
  #9  
Old 06-24-2006, 02:07 AM
majorxp majorxp is offline
 
Join Date: Aug 2005
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey.

I totally could be missing something, but if you have the G2 image block module installed, wouldn't it be easier to just make a module that loads it instead?

That is what I did and it works great. It also will load either embedded or external (depending on the url).

I attached the module I made (it took all of 3 minutes) and should work with any version of vba with a small change here or there... Just edit the file to your domain and delete or add to have multiple images.

Cheers!
Reply With Quote
  #10  
Old 07-13-2006, 06:52 PM
oldgoat oldgoat is offline
 
Join Date: Mar 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello to all
I followed the instructions, but i guess i missed something.
i am running vb 3.5.4, vbadvanced cmps 2.1.0 and gallery 2.1.1
The gallery bar appears in my vbadvanced index page, but the random images are missing in action.

thanks in advance for the help
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:28 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05010 seconds
  • Memory Usage 2,306KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete