vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   PhotoPlog: vBa CMPS Thumbs (https://vborg.vbsupport.ru/showthread.php?t=103839)

calorie 12-26-2005 10:00 PM

PhotoPlog: vBa CMPS Thumbs
 
Purpose: add PhotoPlog random thumbs to vBa CMPS in horizontal/vertical form.

Requirements: both PhotoPlog Lite v.1.0.7+ and vBadvanced CMPS are required.

Fine Print: no redistribution, copyright retained in full, right reserved to uncheck support box.

Sorry, no screenshot provided. Imagine some horizontal or vertical thumbs. ;)

Fun Fact: there were 209 downloads and 37 installs at the time this add-on was last updated.
Fun Fact: there were 644 downloads and 112 installs at the time this add-on was last updated.

lordnex 12-27-2005 07:34 PM

thanks :)

Hasann 12-28-2005 04:02 AM

thanks :)

Robru 12-28-2005 09:38 AM

Perfect view, thanks Calorie :)

dongsongmuathu 12-28-2005 10:11 AM

thank you! :)

klaush 12-28-2005 11:03 AM

Thanks, but doesn´t show up; i think it´s the missing location of the script, which is in: "http://my_site/forum/photoplog".

Any idea what i have to change in the module-file for that?

puertoblack2003 12-28-2005 08:18 PM

installed with no problem.... :rolleyes:

calorie 12-28-2005 09:13 PM

Thanks for the thanks. :)

@klaush: is your PhotoPlog directory set to /forum/photoplog in settings?

indie 12-28-2005 09:25 PM

Works nicely, thanks.

Allan 12-28-2005 10:12 PM

Thanks ;)

Click Install

klaush 12-28-2005 10:25 PM

Quote:

Originally Posted by calorie
Thanks for the thanks. :)

@klaush: is your PhotoPlog directory set to /forum/photoplog in settings?

Yes, it is!

calorie 12-28-2005 10:30 PM

Do you see any part of the block, or nothing at all? What about if you view the HTML source, do you see anything there?

klaush 12-28-2005 10:41 PM

Quote:

Originally Posted by klaush
Yes, it is!

Fixed! My fault!

What must i do to sort 3 or 5 images horizontal?

klaush 12-28-2005 10:45 PM

Quote:

Originally Posted by calorie
Do you see any part of the block, or nothing at all? What about if you view the HTML source, do you see anything there?

Na, i was the stupid guy! You did your job very well!

calorie 12-28-2005 10:57 PM

Ah okay, to change to horizontal, you'd need to edit the photoplog_thumbs.php file, making it similar to the PhotoPlog Forum Home Thumbs plugin.

nitro 12-30-2005 10:00 PM

This works spot on in vbportal after 4 minor changes 5 if you want to make it a horizontal block as per the post above this one.

If your ok with it Calorie I will post the 4 steps and how to call the random thumb script ?

calorie 12-31-2005 06:31 AM

Sure, go for it.

nitro 12-31-2005 11:16 AM

Quick how to make this work in vbportal

open the photoplog_thumbs.php file in an editor &

Code:


Editing the thumbs php file:

1. near the top of the file below the credits add a line

global $permissions;

2. In the php file there are 3 instances of $db-> associated with queries
Change these to $vbulletin->db->

3. @ the bottom of the file comment and add this line or replace the eval line with

//eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('P_photoplog_thumbs') . '";'); \\ Old vba CMS

eval('$p_thumbs = "' . fetch_template('P_photoplog_thumbs') . '";'); \\ New vbportal

Save the file and upload, I suggest a new filename especially if you use both vbportal and vbA
and I suggest placing the file in your photoplog directory.

1. As directed add a new template (for vbportal continuity I suggest)
Template name: P_photoplog_thumbs and place the same content in as Calories instructions

Finally In vbPortal's CP Block layouts add a new php block with Templates set to Yes
Give it the title you desire and save.
Now add this into the content area for the added block, ensure you reflect the path to the thumbs file:

@include(HOMEPATH . '/photoplog/photoplog_thumbs.php');

print $p_thumbs;

This example assumes your photoplog directory is inside your portal directory and the filename did not change.
Save the block again and when you toggle it on for your respective module layouts it should work.
To make it horizontal use the forum thumbs plugin code for layout example and add a center block instead.

I cant say what will work in other portals but this may help as an insight there aswell.

How to is in a code box for the usual licence viewing restrictions.

Any issues just check back to this post as I will likely just update it than spread
vbportal posts throughout this thread.

Step 2 of the file edit (the 3 instance edit) maybe saveable by adding as line 1 of the file or perhaps even as line 1 of the portal block code

Edit: updated this bit as per some more expert advice than mine ;) Still havnt tried the step 2 saver but it should be fine.

Code:

$db = $vbulletin->db;
Dont really have the time to test that bit right now tho as I am about to take the Mrs down to the outlaws. Feel free to experiment with it ;)

Jaynesh 01-03-2006 08:47 AM

Calorie the images arent displaying :S

calorie 01-03-2006 08:23 PM

Check the PhotoPlog permissions in the usergroup manager and look at the HTML source for image tags.

9tn.tip. 01-06-2006 09:33 AM

first just wanna say thanks for sharing this !!

but i seem to have a problem and i cant figure out what it is .........i see the html shell but no picture thumb... my directory is forums/photoplog ya that "s" causes me headaches lol but i have tried every thing i can think of and i still cant get a picture to display in the shell any ideas?

calorie 01-06-2006 10:11 PM

Check the 'can view files' permission in the usergroup manager.

9tn.tip. 01-06-2006 11:33 PM

Yes i do have my user group set to can view ..... ah haha i wonder if this is what klaush did aswell
I am sorry it was something i did lol omg ... I guess it would help if i approved photos so that the registered user can see them as soon as i did that it worked .... thanks !!!

so just to sum up in case someone else has same issue
make sure under your admincp>photoplog >Moderate Files check approved

nelto 01-07-2006 11:09 PM

Hi guys

Nice mod, but Im having a problem.
I have the forums working a sub-domain, and everything works fine there, but... cba is working on root, and I cant get the thumbs whoing there.
Im runing vb 3.5.3

Some help here please.

calorie 01-08-2006 02:28 AM

Do you see anything onscreen where the thumbs should be, and do usergroups have 'can view files' permission?

nelto 01-08-2006 07:17 PM

Hi calorie
Yes usergrups all have "can view files" set to yes.
I dont see anything on screen while on cpms.
Just an empty blank table
Check it
http://www.virtualtuners.com (here doesnt work)
http://forum.virtualtuners.com (here it works)

Am I doing something wrong?

calorie 01-08-2006 09:46 PM

In photoplog_thumbs.php find:
Code:

        $photoplog_location = $photoplog_schemehost.$vbulletin->options['photoplog_script_dir'];
And try replacing with something like:
Code:

        $photoplog_location = 'http://www.domain.com/photoplog';
BTW, forum.virtualtuners.com could not be found.

nelto 01-08-2006 11:58 PM

Yeah lol its forums.virtualtuenrs.com soz :)
I'll do what you told, and get you tuned in.

nelto 01-10-2006 07:23 PM

Quote:

Originally Posted by calorie
Ah okay, to change to horizontal, you'd need to edit the photoplog_thumbs.php file, making it similar to the PhotoPlog Forum Home Thumbs plugin.

Hi
Im having the same problem... all my thumbs are on vertical status, instead of horizontal.
I searched for PhotoPlog Forum Home thumbs plugin, but I cant find it.
Wich file I need to "copy" to photoplog_thumbs.php to make them appear in the horizontal?

Regards

calorie 01-11-2006 05:32 AM

The PhotoPlog Forum Home Thumbs plugin is part of PhotoPlog (ACP -> Plugin System -> Plugin Manager) though there is a horizontal version posted elsewhere. ;)

Neutral Singh 01-11-2006 06:26 AM

Exellent job!! THANKS

Neutral Singh 01-11-2006 06:29 AM

Quote:

Originally Posted by calorie
Ah okay, to change to horizontal, you'd need to edit the photoplog_thumbs.php file, making it similar to the PhotoPlog Forum Home Thumbs plugin.

Is there any way we can also fetch the description along with each thumbnail? That would really beneficial to my website. Thanks again.

calorie 01-11-2006 09:06 AM

In the photoplog_thumbs.php while loop, set the following:
Code:

$photoplog_description = htmlspecialchars_uni($photoplog_file_info['description']);

Club3G 01-11-2006 03:07 PM

Working just fine, thank you!

Quick question - how can I define how many thumbnails are shown?

[high]* Club3G clicks install
[/high]

Edit: Got it, it's in the .php file. :D

Code:

$photoplog_file_infos = $db->query_read("SELECT *
                                                FROM photoplog_fileuploads
                                                WHERE moderate = 0
                                                ORDER BY RAND()
                                                LIMIT 3
        ");


Club3G 01-12-2006 07:09 PM

One more quick question - is there a way to set the thumbnail sizes?

http://www.sevenstring.org

I'd like 'em a little bigger so that they fill out the entire Module. Great mod all around, thank you very much. :)

o85au 01-19-2006 08:45 AM

Quote:

Originally Posted by klaush
Fixed! My fault!

What must i do to sort 3 or 5 images horizontal?

Hi, I'm having the some trouble as what you had mate, I was wondering what you did to fix it? Thanks in advance.

Regardz :)

Guest210212002 01-26-2006 01:02 PM

I'm getting an uncached template warning using this:

Quote:

Page generated in 0.93365 seconds with 19 queries (1 queries for uncached templates) [Server Loads: 0.74 0.84 : 0.70]
Uncached templates: adv_portal_photoplog_thumbs (1)
How would I go about caching it?

Guest210212002 01-27-2006 02:15 PM

I'm not sure if I'm the only one having the problem, but if adv_portal_photoplog_thumbs isn't caching for anyone else, here's how I cache it.

Add a plugin to vBulletin/General -> cache_templates with the following contents:

Code:

$globaltemplates = array_merge($globaltemplates, array('adv_portal_photoplog_thumbs'));

calorie 01-27-2006 02:46 PM

When you set up the module, in the templates used field, is adv_portal_photoplog_thumbs there?

Guest210212002 01-27-2006 04:49 PM

Quote:

Originally Posted by calorie
When you set up the module, in the templates used field, is adv_portal_photoplog_thumbs there?

[high]* Guest210212002 needs to drink less coffee.
[/high]

Yeah, it was there. Of course, the fact that I had it in there as adv_portal_photoplog_thmubs was the reason it wasn't caching.

Thanks man. On the upside, I learned how to write template caching plugins. :D


All times are GMT. The time now is 06:09 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
  • Page Generation 0.01292 seconds
  • Memory Usage 1,818KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete