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-28-2003 07:10 PM

i have a windows server and it runs fine ???

is your server apache or IIS

if IIS i think that is whats causing it :( (i hate IIS)

also i have major edited mine to run from my forums index aswell as my vbindex but pixel fix's code is ok !!!

PixelFx 08-28-2003 07:42 PM

Mickie D,

Got for it, with your permission I'll add your credit, and code to the front page of this hack / update txt, as an addon if you would like. Add it to this thread.

I don't use IIS either, all my stuff will be running on apache as well. So far I've tested this hack on my main site even added exclusive catigories, and multi-ple thumbnail includers on the same database, etc, and it all loads perfectly.

:)

Mickie D 08-28-2003 07:59 PM

ok no worries i always do my own coding on hacks :)

never wrote a hack for others so please dont be harsh on me people if its not to clear :) i will try my best :)

and also my coding i am sure can be made better but it runs fine for me !!!

Mickie D 08-28-2003 10:10 PM

ok pixelfix i have wrote a quite detailed addon to your hack for the forum index (i.e it will display pictures on your main board home above whos online)

please PM me your addy pixelpx and i will send you a copy first and if you want to add it to the hack thats up to you and if you want to change my text that is also up 2 you

PixelFx 08-30-2003 07:48 PM

I updated the front page of this hack,

Note to Mickie D,
I got it, I'll addd your addon shortly to the install txt on the front page of this thread :) I updated credits :)

thanks :)

Mickie D 08-31-2003 07:36 AM

no worries m8

also the file i sent you was for only forum home

i.e www.yoursite.com/forum/index.php (what my addon does is it shows thumbincluder pictures above whos online)

i will add a screen shot shortly :)

i have not wrote my addon for vbindex yet

but dont worry all you guys with vbindex and want to use this i will write it in the next day or 2 :) its not very hard to do either only one file mod and create a template and mod a template :)

Intex 08-31-2003 08:41 AM

PixelFX - ok thx. no problems. Let me know - I'll be waiting to test :).


Mickie D - I'm using Apache, but I'm using myvbindex as my homepage hack. Can you copy me your configuration file for thumbincluder.php, specifically PixelFX and myself weren't sure about the paths. Here is my config settings for thumbincluder.php:

//PhotoPost Setting
//You must change these values in order to run this script

$Url_Path = "http://mysite.com/gallery/"; //URL of your photo album, where the index.php is (with / at end)
$data_dir = "http://mysite.com/gallery/data/" ; //URL of your photo dir where those jpeg stored (with / at end)
$images_dir =$Url_Path."images/"; //URL of your photopost images dir where default missing thumb image is stored (with / at end)
$rel_dir = "data/"; // path to the data directory where pictures reside RELATIVE


My actual site structure is:

Code:

mysite.com (root)
    |--- myvbindex.php (equivalent to vbindex)
    |--- Gallery (photopost location)
          |--- thumbincluder.php
    |--- Forum (vbulletin install)

I believe its just the path info that's incorrect, so if you could copy me your settings as above, I'd appreciate it :).

Mickie D 08-31-2003 08:50 AM

//PhotoPost Setting
//You must change these values in order to run this script

$Url_Path = "http://www.mysite.com/image/"; //URL of your photo album, where the index.php is (with / at end)
$data_dir = "http://www.mysite.com/image/data/" ; //URL of your photo dir where those jpeg stored (with / at end)
$images_dir =$Url_Path."images/"; //URL of your photopost images dir where default missing thumb image is stored (with / at end)
$rel_dir = "data/"; // path to the data directory where pictures reside RELATIVE
// to the location of THIS file (used for checking thumbs)
//Database Setting
//You must change these values in order to run this script
//These value are not visible in the output page source

Mickie D 08-31-2003 08:52 AM

it looks identicle to yours m8y

send me a copy of your thumincluder as ... i remember i did edit mine a little :(

i will compare them and see what i did

Intex 08-31-2003 09:49 AM

Mickie D - I've just PM'd you my thumbincluder file :).

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?

lasto 08-31-2003 08:44 PM

Intex i aint read all the posts but what are you trying to achieve in lymans terms plz :)

Intex 08-31-2003 08:46 PM

My earlier posts were to do with a specific problem of not getting the hack to work. This has now been sovled and I posted the solution.

All that I need now is to exclude photopost photos that are 'private' from showing on the homepage. At the moment it's showing private photos which would usually require a password for a member to see.

lasto 08-31-2003 09:56 PM

u need to get a hack for that from photoposts members area m8

this allows u to exclude certain sections from showing.

PixelFx 08-31-2003 10:16 PM

See first page for catigory exclude addon.....

Intex 09-01-2003 09:41 AM

PixelFX. Thx. for taking the time to demonstrate that. I'll take a look at this shortly :).

PixelFx 09-01-2003 10:00 AM

np ;) I'll clean it up shortly and add it to the front page in txt file...

lasto 09-01-2003 12:33 PM

yep well done Pixelfx will keep eye on post as well :)

Mickie D 09-01-2003 08:53 PM

*** pay no attn to this post

i just read intex got it working so edited :)

well done ***

Mickie D 09-01-2003 09:04 PM

This hack is awsome pixelfx there is no limitations to what you can do with it and the thumbincluder.php

i currently have it running on my PPC search engine and my sql links site lol

also as per my pm good news i nealy have thumbincluder.php showing top 5 uploaders (well quite a bit away lol, it shows top uploaders and makes my pages go completely crazy... still better than it was not working at all yesterday lol ... i will keep plugging away and will let you know how i get on)

Mickie D 09-01-2003 10:38 PM

right i have this now working with a huge difference :)

i can call anything from photopost now :)

i modified the thumbincluder to call a script from the photopost scripts instead of using $user, $database,

i called a script using

require

that has the database user and pass included and also has all the globals used

now i have got my pictures aswell as top submitters and diskspace used

it is pretty complicated to do and i will need to talk to pixelfx

i am on holiday in the next few days so i will be away for a while hopefully i can leave all my guides in pixelfx's hands and he can sort it ???

or just wait for me to get back :)

themonarch 09-02-2003 12:18 AM

I'm trying to tweak this script to just call one user's photo(s) and use that over in each member's profile... here's what I edited in thumbnailer, but it's not working right. It calls user 1's thumbnails.
Code:

//Display Setting (Changes to fit your page)
$q_switch = "theuser";            // "random" or "most_views" or "latest" or "theuser"
$limit = 10;                        //number of image to show
$table_width = "80%";            //width of the table generated
$column = 2;                    //number of columns of the table generated
$photo_cell_align = "center";    //alignment of those cells

and then this further down:
Code:

//added by themonarch
                case "theuser":
            if ( !IsSet($cat) ) {
                $group_title = "Individual Users Photo";
                $query = "SELECT id,user,userid,cat,date,title,description,keywords,bigimage,width,height,filesize,views,medwidth,medheight,medsize,approved,rating FROM photos WHERE bigimage!='' AND userid='$bbuserid'";
            }
            else {
                $query = "SELECT id,user,userid,cat,date,title,description,keywords,bigimage,width,height,filesize,views,medwidth,medheight,medsize,approved,rating FROM photos WHERE bigimage!='' AND userid='Sbbuserid'";
                $group_title = "Individual Users Photos";
            }
            break;
                        //themonarch

You can see it here:
http://www.allartistaccess.com/media...2.php?userid=1

If you change the userid to userid=43, it still pulls user 1's images.

Mickie D 09-02-2003 12:50 AM

bloody 3am in the morning i have been doingthis for lol

here is a screenie of my new addon ... and it also has my hacked thumbincluder.php (allowing it to display top uploaders)

sorry all are lame thumbs but its my test board (local) wont add no beta hacks i made to my forums until i test this a bit more

Mickie D 09-02-2003 05:40 PM

@ themonarch

i would be interested in helping you finish this :)

and also i am now making the amount of pictures uploaded show up in post bit (finding this not as easy though)

PixelFx 09-03-2003 09:28 AM

small Note, I'm working on update for photopost 4.1 and reading back the last few posts, mickie some great ideas and looks like work put into this ... I'm working on 2.0 update that will have addons posted soon I hope, got hit with two contracts last few days so should be back on track tomorrow I hope, for a few hours to update before next contract... ;)

I've got huge update on my personal site coming up to test this and some new new features for the thumbnail includer :)

Mickie D 09-03-2003 03:18 PM

yeah i have been playing with this alot :)

i really like this hack and i dont mind sharing with anyone what i have made, also my templates are poor because i was so happy i got it working i just ram'd it on my site asap, i am sorting out my templates now and should have it all done proppa (without the <hr> tag lol to divide it)

also i am working on other ways for the thumbincluder to call other aspects of the photopost database, i will keep everyone posted on what is going on and what i have done.

PS i noted your pm pixelfx about the thumbincluder and modding it (i will tell matt about what i have done to it and ask his permissions b4 i share anything) and i will only post my thumbincluder that i mod on the photopost site !!! :)

Intex 09-04-2003 03:59 PM

Looking forward to these updates guys :). Is anybody on working on some sort of notification when a new gallery photo is uploaded. I think that is one of the most wanted missing elements.

PixelFx 09-04-2003 07:16 PM

I'm currently testing update for photopost 4.1 final vb2 / vb3.0 support for next update. I'm also playing with specific news and catigory linking for specific gallery and vbforums on there own news pages if that made sence. It's working well but still testing, I'm also working on custom templates in photopost 4.1 for better site intergration both on forum home / vbhome / support for vbindex.

Mickie D is also doing a great job on forum home, and pulling other photopost data to the forum home etc. ALthough we are not yet currectly working directly together we have common goals which as you can see in the posts above help the community over all.

I'm still relatively new to hacking vbulletin, so this is a learning process for me which is quite fun, however is time consumming so I'll try and support and post updates in a timely manner. :)

Harlequin 09-16-2003 12:17 AM

There's something important to mention here (if it hasn't been mentioned already somewhere in this thread).


I was receiving the 'Query Failed' message for a day or two until I finally started searching around on threads and found someone's solution that worked like a charm, and while I forget who it is, they're a great, great person to get this going and noticing something that I had completely skipped.


In an untouched thumbinclude.php around line 177 they'll be a bunch of these similiar-looking $query statements. >

$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat ORDER BY views DESC LIMIT $limit";


Note the 'photos'.



It's a simple oversight, but if you've added a prefix on to Photopost's queries during it's install, say 'photopost_photos' (as I have it on my forum), then you would most certainly get the Query Failed message as I did.


So to remedy this, I added the prefix:

$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photopost_photos WHERE bigimage!='' AND approved='1' $exclude_cat ORDER BY views DESC LIMIT $limit";


And boom, it came up and worked beautifully.


Each of the $query statements in the thumbinclude.php need to be edited the same way if they're making a call to 'photos' rather than, like in my example, 'photopost_photos'.

<edit>

Btw, ty Pixel and Mickie. :)

And heck, this may have actually been mentioned in this thread. My brain ain't with it.

PixelFx 09-16-2003 05:49 AM

thanks for the update, I haven't gotten your error, but it's good to get every angle possible sorted out :)

I just setup my local webserver on xp so will be trying to install on it this hack to test it there as well. Then update my txt files, and add mickie D hack info as well :)

do you have a link for your site? would be nice to see how you made use of the script :)

Harlequin 09-17-2003 09:29 AM

I'm not releasin' anything about the site just yet. ;) It's one of those 'in beta' things.


Though I've converted this to work with vBIndex, though it wasn't that hard or anything to just move the variables over.


All times are GMT. The time now is 10:20 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.01487 seconds
  • Memory Usage 1,855KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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