![]() |
Menalto random gallery photo in vBa 2.1
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&g2_frames=wood"/></head> Edit the plugin randomcmps-plugins.xml replace the CAPS with your domain information and save Code:
<?xml version="1.0" encoding="ISO-8859-1"?> 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%"> PRESS SAVE AND RELOAD Step 5 AdminCP > vBa CMPS> Add Module> Template> Code:
Title: gallery2 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 |
reserved
|
Thanks man!
|
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 |
Quote:
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(); eg. Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%"> |
awesome, thank you defcon_420
|
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 |
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. |
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! |
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 |
the settings to use in randomcmps.php are indicated in the image block settings of the gallery site admin page
|
Quote:
Thanks, Sean |
Is this available for 3.6?
|
works w/ 3.6.4
|
Anyone got this working properly with the integrated Gallery/vBa yet? Here's the link to that hack:
https://vborg.vbsupport.ru/showthread.php?t=111931 I'd love to get this working properly but I have no idea how to do it myself. Thanks in advance to anyone who can help! |
I'm having such a strange problem with this.
It was all working fine until I added a new style to the forum. It's a child style of the working one and the adv_portal_newrandomgallery2 is inherited. The preview works and I see a random image if i browse to the randomcmps.php file in a browser. Im stumped. If i go back to the original style it works fine. Anyone have any suggestions as to what could be causing it? Cheers, Dan. |
Has anybody managed to get this to work in vBa 3?
The preview works, but as soon as I add the module to a page, the contents of the $includedrg don't show. Looking at the displayed page source, the $include isn't returning anything to the output html. |
Does it work with vba 3.*?
Thanks |
Rather than use a plugin, another option is just to write a php file that you use as a php based module (as opposed to template based) and make a call to a template in the php code. You can also decide whether you want to have it link into a standalone gallery (as the examples given so far) or whether to link into an embedded gallery. You do this in the way you compose the request to get the latest/random/whatever image.
e.g. http://{path to your gallery install}/main.php?g2_view=imageblock.External&g2_blocks=ran domImage&g2_show=fullSize&g2_show=title gives a random image which will link to a stand alone gallery page vs. http://{path to your gallery integrated page}/gallery.php?g2_view=imageblock.External&g2_blocks= randomImage&g2_show=title which gives a random image which links to an embedded gallery Try both of the above just in a browser window and 'view source' to see the different links passed back by gallery in each case. I'll give you an example here of what I did to put a latest image block in my web site. Just create a new php file (called whatever you want) in your modules/ directory with the following content: Code:
<?php Finally, create a new template with the name you picked above (mine being called 'adv_gallery_block' in your desired style. You can design the template to garnish the image any way you want and reference the content that is extracted in the php file created previously. My simple example is - Code:
<tr align="center"> You can see mine in action at - http://www.supermotoaus.com |
<a href="https://vborg.vbsupport.ru/showthread.php?t=111931&page=20" target="_blank">https://vborg.vbsupport.ru/showt...111931&page=20</a>
This thread is super uber old. |
All times are GMT. The time now is 03:53 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|