PhotoPlog

PhotoPlog (http://www.photoplog.com/forum/index.php)
-   "How Do I..." Questions (http://www.photoplog.com/forum/forumdisplay.php?f=7)
-   -   Random Thumbs (http://www.photoplog.com/forum/showthread.php?t=7)

Jaki 12-26-2005 04:50 AM

- possibility to add only the Random Thumbs in the header of some forums and not only in forumhome page.

Morgan 12-26-2005 06:11 AM

Here's how to add Random Thumbs on forum home and forum display with PhotoPlog Lite.
  • Go to ACP -> Plugin System -> Plugin Manager -> Edit PhotoPlog Forum Home Thumbs
  • Change the Hook Location from forumhome_complete to global_start
  • Wrap the Plugin PHP Code in an if statement:
    Code:

    if ($forumid OR THIS_SCRIPT == 'index')
    {
            // all plugin code in here
    }

  • Use $photoplog_forumhome right after $navbar appears in the FORUMHOME and FORUMDISPLAY templates.

Jaki 12-27-2005 07:36 PM

Thank's work fine, but if I want the "random thumbs" only in one or two forum and not in all forums?

:o

Morgan 12-27-2005 07:46 PM

Wrap using this if statement instead, where 1,3,5 is replaced with comma separated forumids that you'd like for thumbs, i.e., if you want thumbs on forumids 2 and 4 just change 1,3,5 to 2,4 or if you want thumbs on forumid 6 only, just change 1,3,5 to 6 (the OR THIS_SCRIPT == 'index' bit shows thumbs on forum home but you can remove it if you want).
Code:

if (in_array($forumid,array(1,3,5)) OR THIS_SCRIPT == 'index')
{
    // all plugin code in here
}


Jaki 12-28-2005 04:25 AM

Wow, work! :)

Just last question: is it possible to add only a "random thumbs" of that category in a specific forum?
If I have a category, example hovers, I would want the "random thumbs" to make to see only the images of that category.

:cool:

thank's.

Morgan 12-28-2005 10:46 PM

Go to ACP -> Plugin System -> Plugin Manager -> Edit PhotoPlog Forum Home Thumbs and replace:
Code:

AND moderate = 0
With the following:
Code:

AND moderate = 0
AND catid IN (7,8,9)

Where 7,8,9 are category IDs from ACP -> PhotoPlog -> Category Manager.

You could be a bit more fancy by setting the following right before the query:
Code:

switch ($forumid)
{
    case 0:
        $photoplog_catid_nums = '1,2';
        break;
    case 1:
        $photoplog_catid_nums = '3,4,5';
        break;
    case 2:
        $photoplog_catid_nums = '6';
        break;
    case 3:
        $photoplog_catid_nums = '7,8,9';
        break;
    default:
        $photoplog_catid_nums = '10';
}

And then replace:
Code:

AND moderate = 0
With the following:
Code:

AND moderate = 0
AND catid IN (".$photoplog_catid_nums.")

So that, for example, if $forumid is 3 then the PhotoPlog category IDs 7,8,9 are used.

Jaki 12-29-2005 04:53 AM

Thank's.

I allow me to say these:

If it were you possible you should add therefore the choice in the PhotoPlog Pro version of:

- to add or no the "random thumbs" to all forums
- to add or no the "random thumbs" only to specific id forums
- to add or no the "random thumbs" only to a forums rather than to all

or to consider the content of this 3d to insert the configurations in the xml file.
:)

Jaki 02-18-2006 04:50 AM

- is it possible to activate only the random thumbs for two, three forums, and not for the other whole forumses?

- is it possible that the random thumbs in these forums both that related to that two or three forums?

Morgan 02-18-2006 09:50 PM

Is question one answered in this post? Not quite sure what question two means. :(

Loco.M 04-03-2006 08:21 AM

works great, thank you, is this a phrase "random thumbs" where can i edit these words to "gallery" or something,, thx

*edit, nvm found it, :)


All times are GMT. The time now is 04:17 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.