vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Photopost to vb/Home Intergration v1.7 (https://vborg.vbsupport.ru/showthread.php?t=53539)

Mickie D 08-31-2003 06:46 PM

ok m8 i sent you my includer :) hopefully that works for you

if it dont work dont dispear as i know it works with windows apache servers :)

and also tell me when you go straight to your includer.php

i.e www.yoursite.com/whatever/thumbincluder.php what happens ?????

let me know

PixelFx 08-31-2003 06:51 PM

I think for windows I read that you need to make your url_path,

path = "c:\www\root\photopost\" etc for exmaple

rather than the way I have it listed for the use with linux.

----------

I can do the vbindex version or get mickie to who ever has more time ;) its a fun script to play with :)

I'm about to do clean install of it and test my new addon with pixelfx.ca :)

Mickie D 08-31-2003 06:57 PM

Mine is

$rel_dir = "data/";

i run apache under XP aswell (same as him)

as long as your thumbincluder.php is in your main gallery folder it will be fine

arrggghhh hold on what is your permissions on thumbincluder.php file under windows security (permissions) ????

i am thinking it might not have access rights ???

Intex 08-31-2003 06:58 PM

Mickie D - Thx. for the new file. I've uploaded this and just changed the relevant sections you highlighted with #####. Although I've not tested it on the homepage, I can tell you that running the thumbincluder file directly, thus:

http://mysite.com/gallery/thumbincluder.php

Produces the following:

Code:

Query Failed
From memory, this is exactly the same problem.


Quote:

Today at 08:46 PM Mickie D said this in Post #91
ok m8 i sent you my includer :) hopefully that works for you

if it dont work dont dispear as i know it works with windows apache servers :)

and also tell me when you go straight to your includer.php

i.e www.yoursite.com/whatever/thumbincluder.php what happens ?????

let me know


Intex 08-31-2003 07:02 PM

There are no XP based permissions set on that directory. Photopost operates correctly, so surely that should be fine?

Are you talking about granting specific permissions to the Apache server?


Quote:

Today at 08:57 PM Mickie D said this in Post #93
Mine is

$rel_dir = "data/";

i run apache under XP aswell (same as him)

as long as your thumbincluder.php is in your main gallery folder it will be fine

arrggghhh hold on what is your permissions on thumbincluder.php file under windows security (permissions) ????

i am thinking it might not have access rights ???


Mickie D 08-31-2003 07:06 PM

@ pixelfx .. up 2 you m8 if you want to make a vbindex addon .. it would probably be better than mine lol

did you try my addon for the forum home pixelfx ?

but if you want me to make the vbindex hack i will :)

PixelFx 08-31-2003 07:23 PM

I haven't had a chance to try it yet, building my personal site, at the moment, and doing clean install with photo's latest version...

also I've heavely modified my thumbnail-includes's / plural ;)
----
I need to setup vbindex on my local host to make the changes, I don't think there is much of a change for how vbhome and vbindex link photo's to the main page, with how this hack works. Infact I think you could do the same as the vbhome install I have in the first post but make your vbindex index.php rather than your vbhome index.php ;)

although I have tested that yet, I think that would be the only change in the instructions... I think however making it work with xp, is another story all together ;)

I'll try and post your addon shortly :P I cleaned up the first post quite a bit last night to make the installer and information for the hack easier to read.

let me know what you think :)

Intex 08-31-2003 07:42 PM

OK - I think I'm onto something now. Looking at the actual queries within thumbinclude.php, I noticed that it was referencing tables that don't even exist (highlighted in yellow / bold below), i.e.

Code:

    switch ($q_switch) {
        case "most_views":
            if ( !IsSet($cat) ) {
                $group_title = "Most Popular Images - All Categories";
                $query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat ORDER BY views DESC LIMIT $limit";
            }
            else {
                $query = "SELECT id,user,userid,cat,title,bigimage,views FROM photopostphotos WHERE bigimage!='' AND approved='1' $exclude_cat AND cat in ($catquery) ORDER BY views DESC LIMIT $limit";
                $group_title = "Most Popular Images - $catname";
            }

When I installed photopost, this got installed into the same database as the vB forum. All of my photopost tables have a prefix of photopost, i.e. photopostphotos, photopostcategories. I therefore looked through the file and changed the SQL statements I could find and changed them so that they had the prefix 'photopost' in front, i.e.

Code:

    switch ($q_switch) {
        case "most_views":
            if ( !IsSet($cat) ) {
                $group_title = "Most Popular Images - All Categories";
                $query = "SELECT id,user,userid,cat,title,bigimage,views FROM photopostphotos WHERE bigimage!='' AND approved='1' $exclude_cat ORDER BY views DESC LIMIT $limit";
            }
            else {
                $query = "SELECT id,user,userid,cat,title,bigimage,views FROM photopostphotos WHERE bigimage!='' AND approved='1' $exclude_cat AND cat in ($catquery) ORDER BY views DESC LIMIT $limit";
                $group_title = "Most Popular Images - $catname";
            }

I can't see how this would work given those SQL statements previously, but even when I change the SQL statements (4 x photopostphotos and 2 x photopostcategories), I still get the same 'Query Failed'.

It must be related to this, so any other ideas now?

Intex 08-31-2003 08:08 PM

OK - Success !! Changing each of the queries did actually work - it was just that my page was cached :p.

So basically, the only thing you need to make people aware of is if they have a different photopost prefix option set (when they installed - see Photopost Config options: PhotoPost Database Prefix (cannot be changed)), then they need to alter each of the lines of code where the SQL statements are, to include the prefix of their photopost database tables as shown in my example above. I'd actually put the code changes here, but it would breach copyright :).

Of course, if someone can find out what the variable is for this config option in Photopost, then the variable could be setup in the thumbincluder file :cool:.

Anyway, thx to PixelFX and Mickie D for trying to help with this one. If anything it made me actually go through the thumbincluder file line by line until I actually found the problem :D.

Intex 08-31-2003 08:18 PM

Now onto some configuration issues :D. Everything works perfectly with the exception of one thing. It seems that private galleries are shown which isn't obviously the desired effect. How do you stop it showing photos that are in members private galleries?


All times are GMT. The time now is 03:36 PM.

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.01174 seconds
  • Memory Usage 1,753KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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