Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Photopost Pro Random Image Widget Details »
Photopost Pro Random Image Widget
Mod Version: 1.00, by ZippySLC (Member) ZippySLC is offline
Developer Last Online: Nov 2010 I like it Show Printable Version Email this Page

vB Version: 4.0.1 Rating: (7 votes - 4.71 average) Installs: 45
Released: 31 Jan 2010 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

Hey all,

One of the things that I missed from my transition from Drupal to vBCMS was my Photopost random image block. It's one of the features that my visitors seem to really like as well. After some trial and error, I managed to create a working vBCMS widget that utilizes the "Random Image Anywhere" code submitted by Garrynz on the Photopost site.

Now, I will say that I am not a huge fan of the way that Garrynz's code works (variables are defined in the code rather than looking at the config files), but it's a quick and dirty way to get this work. In no way are your database details visible to anybody, so don't worry - it's more of an aesthetic thing than a security thing.

Anyway, to utilize this widget, follow these steps:

1. Go into your AdminCP, vBulletin CMS, Widgets, and click on "Add New Widget"
2. Create a new widget of type "PHP Direct Execution" and name it what you want. This name gets used in the header of the widget. I chose "Random Image."
3. Paste the following code in, making changes for your specific environment:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Important Notes:
  • Make sure you make the widget be a "PHP Direct Execution" widget! If you don't, none of this will work!
  • Make sure you enter your database information correctly! Check your photopost config files if you've forgotten it. The correct syntax for the entries should be something like this:
    $host = 'localhost'; (with the entry in apostrophes and a semi-colon at the end)
  • If your Photopost tables don't have the pp_ prefix, you'll need to alter the code to reflect your prefix.
  • Make sure the URL to your gallery is set correctly after the print statement. In my case, since my gallery runs in a subdomain, my own print statement looks something like this:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  • The output is wrapped in a div that's centered. Feel free to change that to your liking.
  • Again, this will not run out of the box without some customization on your part! But I hope it's fairly straightforward to understand.
  • SEO vs Non-SEO Friendly URL's:
    Photopost lets you use "Spider-Friendly URL's." There's three different options, spider, SEO, and none. I personally use spider on my Photopost site and the code I have above works fine. If you have your URL's set to "none" you'll need to use slightly different code. In that case, use this alternate print statement. (Replace the one in the code above with this, and obviously adjust the paths to match your specific install.)

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.


You can see this widget in action on my site, http://www.njpinebarrens.com

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #46  
Old 14 Feb 2010, 16:45
ZippySLC's Avatar
ZippySLC ZippySLC is offline
 
Join Date: Oct 2004
Glad I could help!
Reply With Quote
  #47  
Old 23 Feb 2010, 18:47
LCN2007 LCN2007 is offline
 
Join Date: Jul 2007
Any way to show more than one image like maybe 3 or 5 images?


Originally Posted by Bergler View Post
Now that I am playing around with it a bit, I see it doesnt always show a picture?
X2 on this issue, any fix?
__________________

USMC Veteran
" Freedom Has A Taste The Free Will Never Know. "
Reply With Quote
  #48  
Old 24 Feb 2010, 03:16
ZippySLC's Avatar
ZippySLC ZippySLC is offline
 
Join Date: Oct 2004
Originally Posted by LCN2007 View Post
Any way to show more than one image like maybe 3 or 5 images?
The way the code is written, it just does one SQL query and grabs one picture out of the database. To get it to do any more would require the entire thing to be re-written. I didn't write the code to grab the pic from the db or display it, I just adjusted it so it would play nice as a CMS widget.

X2 on this issue, any fix?
So what is happening here is the code is selecting an image that your Photopost database thinks is there, but it isn't. If you look at the thread on Photopost's site you'll see people having the same problem there too.
Reply With Quote
  #49  
Old 27 Feb 2010, 07:50
theduyet theduyet is offline
 
Join Date: Jul 2008
Originally Posted by tazattitude View Post
Actually, there is a file that you can download from Photopost, and re-upload in your "Gallery". Then you run it from your Gallery cp. This will create a "product" file that you upload in your vb products section.
This will create a thumbnail strip that you can specify weather you want newest or newest pics. Plus the amount of images you want to show up.
You can make the changes in the Plugin section.
You can see how I have 6 images are 'random' on my website


This of course, if it's Photopost Gallery
Would you like to attach this file into this thread?
I and serveral VB.ORg members really like to get it.
Thank you!
Reply With Quote
  #50  
Old 27 Feb 2010, 10:29
tazattitude's Avatar
tazattitude tazattitude is offline
 
Join Date: Dec 2009
Real name: Scott F
Originally Posted by theduyet View Post
Would you like to attach this file into this thread?
I and serveral VB.ORg members really like to get it.
Thank you!
Here would be the link and info to it
Keep in mind this is not a widget like ZippySLC's
Reply With Quote
  #51  
Old 27 Feb 2010, 13:12
theduyet theduyet is offline
 
Join Date: Jul 2008
I can't download.
Would you like to attach it in vbulletin.org ?
Reply With Quote
  #52  
Old 06 Mar 2010, 04:45
theduyet theduyet is offline
 
Join Date: Jul 2008
help me
Reply With Quote
  #53  
Old 06 Mar 2010, 11:04
ZippySLC's Avatar
ZippySLC ZippySLC is offline
 
Join Date: Oct 2004
It's right there in the thread that Taz linked to.
Reply With Quote
  #54  
Old 06 Mar 2010, 12:07
tazattitude's Avatar
tazattitude tazattitude is offline
 
Join Date: Dec 2009
Real name: Scott F
Originally Posted by theduyet View Post
help me
Not for sure what you need help with. The link, instructions, download are all there (thanks Zippy). Of course, you'll have to own a Photopost to do this.

Again, this is not the exact same thing that Zippy has done.
Reply With Quote
  #55  
Old 06 Mar 2010, 13:04
molieman's Avatar
molieman molieman is offline
 
Join Date: Oct 2006
Real name: Matt Olieman
Question

Can this be used with PhotoPost "Classifieds?"

Fantastic job, looks great. Thank you.
__________________
Matt Olieman
www.mycockpit.org
Reply With Quote
  #56  
Old 06 Mar 2010, 15:38
molieman's Avatar
molieman molieman is offline
 
Join Date: Oct 2006
Real name: Matt Olieman
This is probably a simple error in my part, but would appreciate some advise to correct this

I get this error after installing the widget on the home page:

Table '*****_****simvb4.pp_photos' doesn't exist
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===============================================
Disregard above, figured that one out

Now I don't have a photos showing. Here is my code, what did I do wrong. Photopost is in the root public_html/photopost and my forum (vB) is here public_html/forums/

If I right click on empty image and select show image in new tab, I get "Photo not found in the database!"


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Matt Olieman
www.mycockpit.org

Last edited by molieman; 06 Mar 2010 at 16:11.
Reply With Quote
  #57  
Old 11 Mar 2010, 07:41
Heldenverband Heldenverband is offline
 
Join Date: Mar 2006
Anybody use this in VBCMS ( vbdesigns.de ) ? I am searching for a similar module to show random images on VBCMS portal.
Reply With Quote
  #58  
Old 11 Mar 2010, 11:24
molieman's Avatar
molieman molieman is offline
 
Join Date: Oct 2006
Real name: Matt Olieman
Thumbs down This mod/widget is dead?

I'm assuming this mod/widget is dead? I couldn't get it to work Looks great on the demo.... but that doesn't help me
__________________
Matt Olieman
www.mycockpit.org
Reply With Quote
  #59  
Old 11 Mar 2010, 16:09
phkk phkk is offline
 
Join Date: Feb 2006
Finished all steps but no output.
Reply With Quote
  #60  
Old 11 Mar 2010, 16:58
Heldenverband Heldenverband is offline
 
Join Date: Mar 2006
At the moment we try to solve this on a module in VBCMS ( vbdesigns.de )
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 11:47.

Layout Options | Width: Wide Color: