PDA

View Full Version : User Integration: 4images Gallery 1.7.2 + vB 3.5.4


mtha
10-16-2005, 10:00 PM
=============================================
User Integration 4images 1.7.2 / vBulletin 3.5.x
=============================================

Copyright: ? 2002 Jan Sorgalla
Integration to vBulletin 2.x by Jan Sorgalla ?
Integration to vBulletin 3.0.1 by mtha
Integration to vBulletin 3.5.0 by mtha
Constribution:
Matrixgl for re-organize the hack
d1635d for adding the fix for 3.0.1
all others for comments and suggestions
=============================================
Hack version: 3.5.0.20051117
Compatible with vB 3.5.x and 4images 1.7.2
Translated Versions:
http://www.vbhacks-germany.com/forum/showthread.php?t=1969
=============================================
Features:
=============================================
- Use vBulletin's user table instead of 4images.
- Forum's members can access and upload pictures (depends on permissions)
- Forum's admin can administrate the album (unless you do the EXTRA part)
- Display Who is browsing album, in the Forum's WhoisOnline list

=============================================
Changes and modifications
=============================================
4images file to replace: 5 (sessions.php, constants.php,admin/admin_global.php,templates/default/user_loginform.html)

Query to run: 0

* If you do EXTRA part, there're few queries to run, depends on what you want to do.

=============================================
Requirements:
=============================================
- vBulletin 3.5.0 (http://www.vbulletin.com/) installed and working
- 4images 1.7 (http://www.4homepages.de/) fresh installed and working
- 4images and vBulletin are installed to use the SAME database
=============================================
Limitations:
- This is ONLY users integration. NO template/style integration.
- This hack use default usergroup for album level, there're only 4 levels of Guest, User awaiting, User, Admin. See Extra section at the end for other solution
- I didnt look at the "cooke path" and "cookie domain" yet, so it will use the default

=============================================
Notes before you install
=============================================
1. Back up the files before you edit.

2. 4images tables and vbulletin tables have to be in the same database.

3. If you run 4images and vBulletin under different subdomains,
for example http://4images.domain.com and http://vbulletin.domain.com,
you should use the following setting for vBulletin in

"vBulletin Options -> HTTP Headers and output":

#############################
Cookie Domain = .domain.com
#############################

Dont forget the dot at the beginning, and change domain.com to your domain. If you do not do this, you might experience a login problem.

4. If you delete users, you should delete the user first over the Control Panel of 4images
and after that over the Administration Panel of vBulletin.
This is neccessary to delete/modify all user-related data from the 4images database (images, comments, usergroups).

5. Its is highly recomanded that you use integration only with fresh new installations of 4images because of the following reason:
In the 4images user-table User A has the User-ID "1".
After integration 4images will use the user-table of vBulletin.
There, the User A has the User-ID "2" and User B the User-ID "1".
All images, comments and usergroup memberships are now "owned" by User B.

6. Lot of people are getting logged out after a certain period of time. This could be fixed by changing
"Session timeout in minutes" to "0" in the 4images control panel.
==============================================

==============================================
INSTALLATION (read intergrate-4image-vB35.txt for more detail)
=============================================

-------
Step 1: Edit the included sessions.php

Step 2. Edit the included constants.php

Step 3: Upload the files in UPLOAD folder to your album directory

Step 4: Import Product product-hao_wol_locations.xml from vB 3.5.0 adminCP product manager

-------------------
LOG:

20051117: clean up code, might have some small errors fixed.
20060410: modify for 4images172
-------
The End :).

mtha
10-17-2005, 08:33 PM
reserved

mtha
10-17-2005, 09:19 PM
In order to make 4Images template look the same as vB template, you can copy vB's header and footer, put into /templates/yourtemplate/header.html and footer.html, make adjustments so that it read the correct location and tables (Assuming that you know html and know how to change html code)

ambumann
10-17-2005, 11:43 PM
Do I need a fresh install in order to upgrade from my 3.0.7 version of this hack? I'm allready running it under 3.5 and it's causing problems for some of my users.

deathemperor
10-18-2005, 03:13 AM
I had to do nothing to make it work with vb3.5, from the time I upgraded to 3.5 it's starting to work already.

deta
10-18-2005, 05:15 AM
Hello,

must i change phps in the orginal vbulletin?
Or ist that a Plugin/Produkt?

Please post Screens..

Thanks

cu Deta

Chrissicom
10-18-2005, 07:44 AM
Works like a charm on my site :) http://www.sandrabullockcentral.com/sbcgalleries

deta
10-18-2005, 11:13 AM
Works like a charm on my site :) http://www.sandrabullockcentral.com/sbcgalleries

that is not a intigration in Vbulletin

cu Deta

Snake
10-18-2005, 12:10 PM
Thank you. I have installed this hack.

deathemperor
10-18-2005, 05:08 PM
that is not a intigration in Vbulletin

cu Deta
why isn't it ?

it use 4images and vbulletin 3.5 and they are integrated. then why not ?

steadicamop
10-18-2005, 05:57 PM
In order to make 4Images template look the same as vB template, you can copy vB's header and footer, put into /templates/yourtemplate/header.html and footer.html, make adjustments so that it read the correct location and tables (Assuming that you know html and know how to change html code)

Which template do I need to copy? I've tried the header code ... but being PHP it doesn't parse inside HTML ..... what do I have to do to include the header, and will it change the colour scheme of the 4Images in the process?

Thanks, great hack :)

Jason

deta
10-18-2005, 07:14 PM
why isn't it ?

it use 4images and vbulletin 3.5 and they are integrated. then why not ?

The Sample of Sandra is not integrated...

Tell me please a Sampe Page or Screens.

Thanks

cu Deta

vBFreak
10-18-2005, 07:49 PM
Works for me, thanks again for this quality hack mtha ;)

The only problems I have are, if I login via the Gallery I'm redirected to the forum's home and not to the gallery and the display of the online users seems to miss some phrases, the users are displayed, but the table head of that table is empty and the text above the user listing is also not displayed :/

@deta: http://www.gerritsforum.de/gallery <- my 4images 1.7.1 gallery integrated with this hack, feel free to take a look at it if you want to see it in action, but it's german...

mtha
10-20-2005, 12:03 AM
The only problems I have are, if I login via the Gallery I'm redirected to the forum's home and not to the gallery

I have mine return to album fine.


and the display of the online users seems to miss some phrases, the users are displayed, but the table head of that table is empty and the text above the user listing is also not displayed :/

You may want to check your phrases and templates. My hack doesnt do anything with phrases. you may want to get the latest phrase from 4images, and check your phrase list. (languages/english/main.php)





Originally Posted by Chrissicom
Works like a charm on my site http://www.sandrabullockcentral.com/sbcgalleries


that is not a intigration in Vbulletin

cu Deta

I'm not sure if you know what you are talking about, or expecting on integration.

this integration is ONLY integrate USER database, so that users in forum can login and post in album. this DOES NOT integrate style/template, so that it will still look exactly the same as the original 4images, if you had it installed.

the screen is attached, if you want.

mtha
10-20-2005, 12:06 AM
2005.10.19: bug fix:

For those who download the file before ... NOW, you may want to download the sessions.php again.

there's a bug when loading logouthash

deta
10-20-2005, 04:12 AM
I have mine return to album fine.



You may want to check your phrases and templates. My hack doesnt do anything with phrases. you may want to get the latest phrase from 4images, and check your phrase list. (languages/english/main.php)






I'm not sure if you know what you are talking about, or expecting on integration.

this integration is ONLY integrate USER database, so that users in forum can login and post in album. this DOES NOT integrate style/template, so that it will still look exactly the same as the original 4images, if you had it installed.

the screen is attached, if you want.

Hello

I mean direct intigration in the Vbulletin Style.
With headers, ... like that as the Memberliste etc. is integiert and
a new side is not called.
Thus a complete Template intigration

cu deta

Sychev_S
10-22-2005, 10:34 PM
How exactly can i have vbulletin's footer adn header on 4images gallery?
my vbulletin isntallation is in www.mysite.com and 4 images is in www.mysite.com/gallery
Could somebody please explain it to me?

nitro
10-23-2005, 08:35 AM
Thanks works fine here on my test site having grabbed our old 4images seperate db and thrown the tables into my vb test db. USer integration is better than nothing. The rest would take a lot of work :)

Not sure if we will use it or go vbA gallery but 4images can now get more consideration ;)

mtha
10-23-2005, 10:29 AM
Hello

I mean direct intigration in the Vbulletin Style.
With headers, ... like that as the Memberliste etc. is integiert and
a new side is not called.
Thus a complete Template intigration

cu deta

Ok, I rename it "User Integration", which, as stated in the description, only integrate USER system, so that forum's user can upload images in 4images.

This is NOT a full integration, nor template/style integration.

if you are looking for a full integration, with template included, vBA or Photopost could be the options

How exactly can i have vbulletin's footer adn header on 4images gallery?
my vbulletin isntallation is in www.mysite.com (http://www.mysite.com/) and 4 images is in www.mysite.com/gallery (http://www.mysite.com/gallery)
Could somebody please explain it to me?

You should go to 4images website, and learn how to edit template. then, you can edit 4images' templates. (header.html and footer.html), so that it might look the same as your forum.

that is not included in this hack, as each template will be different.

kai3k
10-23-2005, 09:29 PM
works great. thanks!

/me clicks install

nokturno
10-27-2005, 03:07 AM
thanks!

GamerJunk.net
10-28-2005, 05:18 AM
Everytime I log in, it takes me back to the index and I am not logged in. WTF?

www.gsnforce.com/4images

Chrissicom
10-28-2005, 11:49 AM
I didn't use the vB template for my 4images page because it is linked from other websites as well. My intention was that forum users gain access to the galleries automatically and the other way round, so although a lot of people only use one of both those who use both can use it with one account.

GamerJunk.net
10-29-2005, 01:10 PM
So how can I log in?

mtha
10-30-2005, 03:16 PM
Everytime I log in, it takes me back to the index and I am not logged in. WTF?

www.gsnforce.com/4images (http://www.gsnforce.com/4images)

I really dont like to answer when people swearing!



you need to read the steps, and make correct modifications in the given files. I did something wrong somewhere.

Sadie Frost
11-05-2005, 10:19 PM
I'm having sort of a strange problem. I had this working yesterday, but now I'm having the problem where I can't login (it takes me back to the forum home). I've checked and rechecked the directions, and I set the session timeout to 0. Has anyone had a similar problem and found a solution?

Thanks :)

mtha
11-06-2005, 01:51 AM
I'm having sort of a strange problem. I had this working yesterday, but now I'm having the problem where I can't login (it takes me back to the forum home). I've checked and rechecked the directions, and I set the session timeout to 0. Has anyone had a similar problem and found a solution?

Thanks :)

I set the session timeout to 0.

why 0? I dont play much with session timeout, but zero means it always timeout, isnt it?

make it a big number and see how it works

Sadie Frost
11-06-2005, 10:55 PM
Maybe I misunderstood this part of the directions then?

6. Lot of people are getting logged out after a certain period of time. This could be fixed by changing
"Session timeout in minutes" to "0" in the 4images control panel.


Will try setting it big then :) Thanks!


Edit: Hmm that didn't work so far :(

Edit again: Well it's working now, unfortuneately I have no idea what I did...lol

JirQUEST
11-08-2005, 07:06 PM
I'm having sort of a strange problem. I had this working yesterday, but now I'm having the problem where I can't login (it takes me back to the forum home). I've checked and rechecked the directions, and I set the session timeout to 0. Has anyone had a similar problem and found a solution?

Thanks :)

i am having the same problem too. set session timeout to 200. still got me logged out after about 15 mins of inactivity. now i cant log back in without clearing my cookies :/

Sadie Frost
11-08-2005, 10:53 PM
Yep same thing is happening to me - when I first install (or reinstall as the case may be) it's fine, then the next time I try to access it I'm logged out and I can't log in again.

Clearing my cookies doesn't seem to work for me though :(

JirQUEST
11-08-2005, 11:13 PM
did u clear it by logging out? i had to clear it from the browser's options. i also noticed that logging in from the forum is a sure way to log into the image gallery. logging out is the same as well.

Sadie Frost
11-08-2005, 11:26 PM
I logged out via the forumhome and then cleared my cookies in the browser. Then I re-logged in to the forumhome, then clicked on a link to the gallery, but I wasn't logged in.

Omranic
11-12-2005, 11:18 PM
Everytime I log in via gallery,it say thak you SolidSnake@GTI for loging in (forums's welcome redirecting msg) & then it takes me back to the gallery's index and I am not logged in

all modifications are right
gallery's dir out side forums dir

mtha
11-15-2005, 11:21 AM
well, my version is just working fine without problem.

i'd suggest you check the cookies path in both vB and 4images, configurations in constants and config file, license number,

try to login with "remember me" turn on/off, login from forum and go to album ...

i dont really have time to look into the issue in detail right now, but if I can get some clue, it'd be much easier.

Omranic
11-15-2005, 02:49 PM
I have Tried all of that & it still say thank you for login & redirect me to the login page

any one can solve this plz ?

mtha
11-15-2005, 07:18 PM
you can try to fall back to the older version, without the vBulletin edit.

https://vborg.vbsupport.ru/showthread.php?t=66335

it said to work too, with small bugs that can be fix otherway

chanzero
11-16-2005, 06:02 PM
i am getting the following error:

DB Error: Bad SQL Query: SELECT u.*, l.*, user.password as user_password, user.salt as salt FROM vb3_user u, 4images_lightboxes l, user WHERE u.userid = 976 AND user.userid = 976 AND l.user_id = u.userid
Table 'chan_zero.user' doesn't exist

everything else seems to be working -- i'm logged in with my vb login and i can see WOL

the vb user table is actually called "chan_zero.vb3_user" but i already put 'vb3_' as the vb table prefix in the constants.php so i'm not sure what i didn't do right?

mtha
11-16-2005, 10:50 PM
quick fix: edit sessions.php, line 302, 303, 304, replace with this:


$sql = "SELECT u.*, l.*
FROM ".USERS_TABLE." u, ".LIGHTBOXES_TABLE." l
WHERE ".get_user_table_field("u.", "user_id")." = $user_id AND l.user_id = ".get_user_table_field("u.", "user_id");

chanzero
11-17-2005, 05:11 AM
thanks mtha. actually i just used your sessions.php and it worked fine without editing those lines

mtha
11-17-2005, 11:35 AM
I have Tried all of that & it still say thank you for login & redirect me to the login page

any one can solve this plz ?

well, your login form seems to work, but it doesnt know where to redirect to, and if it redirect to the login page (forum login page?) then the url is wrong somewhere.


i just clean the code alittle bit, try the new files and see how it work out. (save the old backup plz)

seany1
11-17-2005, 09:59 PM
thanks mtha :D been trying this for days finally got it to work. i did get an error when i tried to sign in though saying i had to add the address to my white list. but not if im signed into the forums so im not to bothered about that lol

Thanks anyways

*Install*

Edit

Sorted out the problem but its kicking me back to the main forum page, ive cleared all my cookies and logged out of the forum when i sign into the forum then click on the gallery it shows me online but not logged in?? when i try to login it kicks me back to the forum home, when i try to login to the admin part it just goes back to the admin login page for 4 images?

Any Ideas ive been through and checked all the files and everything seems to be ok

Omranic
11-18-2005, 12:17 AM
mtha
sorry every thing still as it is
the login problem as i said later .... any fix ...?

tuanluu
11-18-2005, 02:32 AM
get this error on index page

Notice: Undefined variable: cookiedomain in \wwwroot\4images\includes\sessions.php on line 433

Notice: Undefined variable: cookiepath in \wwwroot\4images\includes\sessions.php on line 434

Notice: Use of undefined constant user_level - assumed 'user_level' in \wwwroot\4images\includes\sessions.php on line 446

Notice: Use of undefined constant user_level - assumed 'user_level' in \wwwroot\4images\includes\sessions.php on line 452

Notice: Use of undefined constant user_level - assumed 'user_level' in \wwwroot\4images\includes\sessions.php on line 454

Notice: Use of undefined constant user_level - assumed 'user_level' in \wwwroot\4images\includes\sessions.php on line 458


help plz thanks

zzzxxzzz
11-18-2005, 08:40 PM
can we make the image picture randomly on forumhome?

tuanluu
11-19-2005, 08:03 AM
does this hack compatable with the php 5.0.5 and mysql 5.0.15, bc there are some change

tuanluu
12-01-2005, 05:53 AM
is this still support?

mtha
12-01-2005, 02:12 PM
is this still support?

well i;ve been too bz, cant support this right now. sorry

tuanluu
12-01-2005, 03:45 PM
Okay glad to hear from you.... This is final week right, everyone is bz. I will come back next week to check on this.

I am current on vb 3.5.1. run on php 5.0.5 and mysql 5.0.15.

I never change my default cookie.

Notice: Undefined variable: cookiedomain in Inetpub\wwwroot\4images\includes\sessions.php on line 434

Notice: Undefined variable: cookiepath in Inetpub\wwwroot\4images\includes\sessions.php on line 435

Notice: Use of undefined constant user_level - assumed 'user_level' in Inetpub\wwwroot\4images\includes\sessions.php on line 447

Notice: Use of undefined constant user_level - assumed 'user_level' in Inetpub\wwwroot\4images\includes\sessions.php on line 449

Notice: Use of undefined constant user_level - assumed 'user_level' in Inetpub\wwwroot\4images\includes\sessions.php on line 453

Notice: Use of undefined constant user_level - assumed 'user_level' in Inetpub\wwwroot\4images\includes\sessions.php on line 459

Chrissicom
12-04-2005, 12:04 PM
Ok this is a weird bug I have. Internet Explorer users can login without any problems through the picture galleries or forums page without any problems (no matter if remember me is checked or not).

If someone uses Firefox 1.0.4 or 1.0.5 logging in through the galleries page won't work. Also when you login through the forum (which works) you are still not logged in, in the galleries. Is that a Firefox bug??

flash7
12-05-2005, 07:54 AM
Login (cookie) problem here :surprised:
- the users can't access on the gallery
- the login redirect also don't work (maybe a vb bug)

vb 3.5.1
4images 1.7

flash7
12-13-2005, 10:43 AM
remove from user_loginform.html (not required)
<input type="hidden" name="url" value="{self_full}" />

search
<input type="hidden" name="s" value="$session[sessionhash]" />
replace with
<input type="hidden" name="s" value="" />

whoever there is a login problem in my gallery :ermm:

mogzy
12-21-2005, 09:00 PM
hi guys, looks like i have a unique problem.

ive been intergrating 4images with vb using scripts on here since vb3 and so far ive had no problems.

with this intergration i get the following error...

Fatal error: Call to undefined function: create_cache_id() in /home/nation/public_html/gallery/includes/page_header.php on line 43

if anyone could help me that would be great...could do with not having my gallery down over crimbo, its goin to be busy

asianboi
01-18-2006, 03:48 AM
Hello,

I tried to login as an admin via the album login and it returns me back to the index page.

tuanluu
01-18-2006, 07:22 AM
I don't but I think this hack does not work with php 5.0.5 and mysql 5.0.15., because I been try to intergrate :( not luck for me. I don't have any table prefix but it alway give the same error.. plus we have not heard anything from mtha or support :(

agiacosa
02-17-2006, 09:21 AM
When you say 4image and vB need to be in the same database, how exactly is this accomplished? Do I need to install 4image and give it the vB database information when the 4image installer comes up?

hiiped
02-17-2006, 11:04 PM
When you say 4image and vB need to be in the same database, how exactly is this accomplished? Do I need to install 4image and give it the vB database information when the 4image installer comes up?


when you install vB you added the database info in your config.php file
you should make sure its the same info in the 4images config.php file

hostname
username
database name
and password
should be the SAME for both install

obmob
03-04-2006, 02:35 AM
Great extension, thanks.

I'm trying this on vb 3.5.4 & the new 4images 1.7.2, i think files didn't change that much, and it even works with the include files in this mod.

Anyway, so far ir seems to be working well, only one thing, when i log in via 4images, i'm redirected to the forum home... is there something i must add or declare to be redirected to to gallery index?
I read all the thread, but don't see something like this. Hope someone can help. :)

redlabour
03-06-2006, 01:43 PM
Everything installed - no Errormessages but allways logged out from Gallery. :disappointed:

obmob
03-06-2006, 08:16 PM
OO now it's working really fine for me.

Paprika
03-11-2006, 07:16 PM
Sounds hott!

Imma try this with 3.5.4 later!

obmob
03-17-2006, 04:01 PM
Hmm, anyone knows how to call random images from 4images and show then in vbAdvanced or forumhome? Oo
hope someone knows, i searched vbA but nothing good ><

hiiped
03-18-2006, 12:09 AM
Hmm, anyone knows how to call random images from 4images and show then in vbAdvanced or forumhome? Oo
hope someone knows, i searched vbA but nothing good ><
http://www.4homepages.de/forum/index.php?topic=1020.0

obmob
03-20-2006, 02:14 AM
http://www.4homepages.de/forum/index.php?topic=1020.0Thanks! ^^

Oo is it possible to call this inside templates? so fai i've been able to add it via iframe, but it's not the same.

<?php
include("./random.php");
?>

2ndCz
03-24-2006, 11:08 AM
Like said previously, any idea how to stop redirecting to forumhome when logging in via gallery?

Also, how would I fix it so that when you click on a member name (while in gallery) it shows their uploaded pictures to the gallery instead of going to their memberinfo on vbForums? (Like it would do pre-integration).

Thanks

EDIT:

To stop going to memberinfo when you click on a member name edit sessions.php

And comment out this line, like this:

//$url_show_profile = $url_app."member.php?u={user_id}";

That seemed to do it for me. :D

vBFreak
03-24-2006, 09:27 PM
Is it working for 4images 1.7.2?

hiiped
03-24-2006, 09:59 PM
Is it working for 4images 1.7.2?
yes it does
.....

pete_brady
03-29-2006, 05:02 PM
great stuff

thanks dude

Neal-UK
03-30-2006, 05:34 AM
Anyone manage to solve this log out issue?

All my files are in order from what I can tell.

Forums i'm logged in but when I click Gallery, i'm logged out and when I log in, I get redirected back to the log in screen.

obmob
03-30-2006, 03:04 PM
Well, i installed this in 1.7.2 and start to have that problem if users sign in via 4images.

Also, i'm getting some troubles in admin section. When you try to edit images or categories, after you do, you are redirected to index instead of admin/index besides that... 4images is still my favorite, Photopost is too unfriendly and vBA doesn't have all 4images have u.u

Neal-UK
03-30-2006, 08:34 PM
aye shame that. I get redirected to index via admin instead of admin/index.

On same version as you

Neal-UK
03-30-2006, 08:42 PM
log in problem seems to have disapeared, weird working now on that bit.

obmob
04-01-2006, 01:44 PM
:( you did something? changed something?

Paprika
04-02-2006, 09:22 AM
I'm having a similar problem I'd like help with, please:

1) To get logged-into 4images I must clear my cookies, and re-log into vBulletin. Then I'll be logged into 4images, but for only a few minutes. Then I'm logged out again.

I'll be working on this problem as time progresses and I'll keep you updated.

Ghanem
04-08-2006, 08:10 AM
I have the same problem, logged in in vb, not able to do so in 4images..
I got logged once only when I changed to another user, could not do it again..

If the settings were not correct I would not be able to login at all..

VB : 3.5.4
4images: 1.7.2

What could be wrong :(

mtha
04-10-2006, 04:55 AM
try the new files for 4images v1.7.2 and see if it works.

Ghanem
04-10-2006, 11:58 AM
try the new files for 4images v1.7.2 and see if it works.Sorry, its not working..

Thank you for helping although you mentioned you are busy.

tuanluu
04-10-2006, 10:44 PM
updated work great thanks very much

Paprika
04-15-2006, 07:17 AM
My problem actually still presists too..

At first after the upgrade I thought it was working correctly but a day or two later I go back to the gallery and see myself logged-out. Then I goto the forum and it has me logged-in.

So I go back to the gallery and logg-in but still it doesn't see me as being logged in.

Even logging-out completely and logging back in won't get me in...

WTF

obmob
04-16-2006, 01:51 AM
Oh, thanks mtha, i'll try new files :)

EDIT
Hmm it logs in, but doesn't redirect me to images page, instead, it takes me to forum home :p

obmob
04-21-2006, 11:06 PM
:( now users are complaining... they are kicked out and must log back while browsing.

Paprika
04-23-2006, 04:46 AM
I'm going to hate to have my gallery and foum have different user bases, but this bridge or whatever is having cookie problems for me, so bad I can't always log-in, and when i do it doesn't stay logged-in.

obmob
05-17-2006, 02:32 AM
Well, hope this isn't a problem, i compared 1.7.1 hack with 1.7.2 files, this is the result, isn't the same as in 1.7.2 release by mtha, so make sure you save a copy in case you don't like how this works.

So far i don't have more complains about system kicking people out after a while. But i don't know, i think something is missing, and didn't attach login template cause i can't make it redirect to 4images.

Don't know why, but the new release by mtha isn't working for me. :(

vBFreak
05-29-2006, 01:34 AM
*** Warning, important security hole fix ***

Since there's a sql injection security issue in sessions.php of 4images 1.7.1/1.7.2, V@no from 4images has also made an extra fix for the vBulletin users because they're also affected, even if the code to change on the 4images website seems to be not in the modified sessions.php the hole is in there in another line...

My gallery was affected and got sql injected by some spambots, so I think it's good for you to know that :)

Find:
function get_session_id() {
global $HTTP_GET_VARS, $HTTP_POST_VARS;
if ($this->session_id = $this->read_cookie_data(COOKIE_PREFIX."sessionhash")) {
$this->mode = "cookie";
}
else {
if (isset($HTTP_GET_VARS[SESSION_NAME])) {
$this->session_id = $HTTP_GET_VARS[SESSION_NAME];
}
elseif (isset($HTTP_POST_VARS[SESSION_NAME])) {
$this->session_id = $HTTP_POST_VARS[SESSION_NAME];
}
else {
$this->session_id = false;
}
}
}

Replace it with:

function get_session_id() {
global $HTTP_GET_VARS, $HTTP_POST_VARS;
if ($this->session_id = $this->read_cookie_data(COOKIE_PREFIX."sessionhash")) {
$this->mode = "cookie";
}
else {
if (isset($HTTP_GET_VARS[SESSION_NAME])) {
$this->session_id = $HTTP_GET_VARS[SESSION_NAME];
}
elseif (isset($HTTP_POST_VARS[SESSION_NAME])) {
$this->session_id = $HTTP_POST_VARS[SESSION_NAME];
}
else {
$this->session_id = false;
}
}
$this->session_id = preg_replace('/[^a-z0-9]+/i', '', $this->session_id);
}

The original thread can be found here (http://www.4homepages.de/forum/index.php?topic=12807.0) (my request for a vB fix is on page 2)

kai3k
06-02-2006, 05:05 PM
Ok, thanks.

edited and works without any problems. :up:

redlabour
06-08-2006, 05:46 PM
Does it works with vBulletin 3.6 BETA ?

xec
06-09-2006, 08:11 AM
Hi, I am working with 4images 1.7.2 and vBulletin 3.5.4


One of the changes in sessions.php is

define('ALBUM_FOLDER','/album/'); //Your Album Folder WITH trailing slash

Does this mean the root of 4images gallery? I have installed 4images at the root (www.mydomain.com). So would I need to change that to(?):

define('ALBUM_FOLDER','http://www.mydomain.com/'); //Your Album Folder WITH trailing slash




Also, for constants.php it has

define('SCRIPT_URL', 'http://www.YOURWEBSITE.org/album'); //no trailing slash

So would I need to make that(?):

define('SCRIPT_URL', 'http://www.mydomain.com'); //no trailing slash

Since my 4images gallery is installed at www.mydomain.com

Thank you for your time.

Blackmana
06-16-2006, 06:37 PM
My problem actually still presists too..

At first after the upgrade I thought it was working correctly but a day or two later I go back to the gallery and see myself logged-out. Then I goto the forum and it has me logged-in.

So I go back to the gallery and logg-in but still it doesn't see me as being logged in.

Even logging-out completely and logging back in won't get me in...

WTF

yes :( this problem me too... somebody help me please? I can't logg-in control panel, because i cant see control panel button (vbulletin is ok).. screen:

obmob
06-19-2006, 04:50 PM
u.u i gave up with 4images... i really love it, but it's not the best to work with vB.

vBFreak
07-27-2006, 12:52 AM
Hrm, any tests available with vB 3.5 and 4images 1.7.3 or even vB 3.6 and 4images 1.7.3 yet?

Would like to know if it works before I update at least to 1.7.3 which is recommended by 4homepages because of the fixed security holes and bugs...

mtha
07-28-2006, 01:19 AM
Dear all,

Even though that I like 4images alot (I like it much more than most other script), I need to move to a different album management, that fit better with our website (not because of the intergration).

Besides, I dont really have much time spending on this, so, if there is anyone who is inspired enough by this hack, and by 4images, can take care of the intergration, and give support, that would really be great.

I try the best of what I can do, but I cant promise much

Thank you very much for all of your supports by using the intergration.

mtha.

PS. If no one want to work on the matter, I promise I will clean up the code, and change the way the integration work, so that it might work better.

e7lew
08-03-2006, 12:18 PM
Does it works with vBulletin 3.6 BETA ?

kai3k
08-03-2006, 08:37 PM
Thx mtha!

Great work!

vBFreak
08-03-2006, 11:32 PM
Anyone using/tryed it with 4images 1.7.3 yet?

Thanks anyway for your good work mtha :)

ocdotcom
08-22-2006, 12:43 AM
Allright Ill venture into these here forums and post a question. Be kind :confused: How should I link to the galleries from the forums and maintain the session info? I made a href on my navbar in VB to point over to 4images but it says Im not logged in. Im REALLY sorry if this has been answered - Im very tired and have been searching for some time. I usually find the answers I need here and thats why I dont post much. Thanks in advance!

ocdotcom
08-22-2006, 01:01 AM
Making slow progress - Ive been able to determine that new users seem to work fine but existing VB users dont get "passed" over to my image gallery.

ocdotcom
08-22-2006, 01:04 AM
Well now all users are working - perhaps I am plagued by the timout issues others were having? (both of my sessions timeout at 900 sec)

*edit* Yep - timeout issues for sure - I get logged out at random times - sometimes after only 2-3 minutes - sometimes there are no issues at all..

amul
08-30-2006, 07:48 PM
I've had the same issues with the login system as many people here.
When I went to the 4images page it would recognize the users logged into the forum and display them on the bottom of the page, but I would not be logged into 4images itself.
Because of that it also didn't display the admin control panel link for me,
and when I went to the admin index.php file manually, it asked me to login, after which I got reverted to the forum home page and was still not logged into 4images.

I discovered that I had changed the cookie prefix when installing VB, so after I edited the configuration part in sessions.php to the correct Vbulletin cookie prefix as it is listed in your config.php file for Vbulletin, it worked great.
No more login issues and control panel link shows up.
I have the session timeout set to 1800, but I really don't think it matters much as long as both the vbulletin and 4images timeout are the same.
Hope this helps anyone.

vBFreak
09-04-2006, 03:42 PM
Anyone here who has tested it with vB 3.6?

VViper
09-05-2006, 11:44 AM
anyone use this with Vb3.6 and 1.7.3? :)

vBFreak
09-05-2006, 12:40 PM
I've upgraded my board to vB 3.6 yesterday, it seems to work with vB 3.6 and 1.7.2. The sessions.php from 1.7.3 differs alot with the one used in this hack, so I don't think that this would work.

You should apply all security patches in the 4homepages forum, the developers of 4images, then your 1.7.2 install is also secured, so you can continue using 1.7.2 until mtha releases a new version.

VViper
09-09-2006, 12:12 PM
Hey has anyone got a random image module to work with VBA and the new version of 4images?
I want to get images from 4images into the right hand side of page index.

I can confirm that it does work with 3.6 and 1.7.3

ocdotcom
09-15-2006, 02:32 PM
VViper - you can confirm this hack works on 3.6 and 1.7.3? Thanks

VViper
09-16-2006, 04:00 AM
Yes works a treat. Be sure to make the changes to global.php as per the latest security bulletin though.

vBFreak
09-16-2006, 04:18 AM
I'm currently running vB 3.6.1 and 4images 1.7.2 with the latest security fixes from the 4homepages website, everything seems to work fine :)

The sessions.php from plain 1.7.2 and plain 1.7.3 are way different, thus I didn't try to use 1.7.3 with the old 1.7.2 sessions.php because I want to avoid driving into problems.

A 1.7.2 install with the security fixes applied is considered to be as safe as the actual 1.7.3 by the developers, so I'll stick to 1.7.2 until mtha comes up with a new, fixed hack version for 1.7.3.

VViper
09-16-2006, 05:10 AM
I love 4 images and so do the members.

hey has anyone got a method for pulling in random images from the gallery into Vbadvanced?

vBFreak
09-19-2006, 09:46 PM
Maybe this can be useful for you:

http://www.4homepages.de/forum/index.php?topic=1020.0

Creating a new left or right-sided block and adding that code *could* work, if you're going to check that out let me know if it works, if not I'll try it for myself in my test board, maybe we can release this as a sub-mod then :)

Paprika
09-24-2006, 06:17 AM
I see you guys are talkin about getting some random images onto your forum pages, but I want to get my like 5 latest gallery submissions to appear on near the top of the index page of my forum... any ideas?? or atleast 1..

ocdotcom
09-24-2006, 03:16 PM
OK it appears to be working for me! I upgraded the boards to 3.6.1 and did a fresh install of 4images. I installed 1.7.3 because I couldnt find anywhere to download old versions of 1.7.2. Thanks for everyones help. If anything changes I will post here.

ocdotcom
09-25-2006, 09:41 PM
I had a few random logout occurences but I changed the logout for 4images to 0 and left Vbulletin at 1800 and it seems to be working great.

vBFreak
09-26-2006, 12:41 PM
Sometimes I've also had the problem that I was logged in in my Forums and logged out in my Gallery, even re-login to vBulletin didn't help then.

In that case simply close your site and clear ALL your cookies and your browser cache, then go back to your site and login, now the gallery should recognize you again ;)

vBFreak
09-26-2006, 06:32 PM
I love 4 images and so do the members.

hey has anyone got a method for pulling in random images from the gallery into Vbadvanced?

Ok, there we go.

1) Download the attached random.php (I've modified the one from that mod a bit to fit with vBAdvanced).
Edit it and change:
define('ROOT_PATH', './4images/');
To the folder of your 4images installation. Upload it to the modules/ folder in your forum's root directory (where your vBA-Module files are).

2) Create a new template called adv_portal_gallery and put the following content into it (Don't forget to change ./4images/ to your 4images path:
<tr>
<td class="$bgclass">
Name: $image_name<br /><br />
<a href="./4images/details.php?image_id=$image_id" target="_blank"><img src="$thumb_src" alt="" border="0" /></a><br /><br />
Comments: $image_comments
</td>
</tr>

3) Add a the module to your vBAdvanced, choose PHP-File as the source.
Enter the following data into the fields:

Module Title: Gallery
Column: Left or Right, depends on where you want to have it (Don't use center!)
File to Include: random.php
Identifier: gallery
Templates Used: adv_portal_gallery


You may now use the following variables in your template:
$total_images - The total number of images in your 4images gallery
$image_id - The ID of the random image
$cat_id - The category of the random image
$image_name - The name of the random image
$image_comments - The number of comments made for the random image
$thumb_src - The link to the random thumbnail file

See also the attached screenshot, it works fine for me :)

vBFreak
10-08-2006, 08:35 PM
If you are interested in SEOing your Gallery and to integrate it into your vBSEO Sitemap you should first install the 4images SEO mod (http://www.4homepages.de/forum/index.php?topic=6729.0) and then download my small addon for the vBSEO sitemap (http://www.vbseo.com/f44/sitemap-addon-4images-galleries-8480/)

Shinji Ikari
10-09-2006, 04:51 PM
this mod no work with 4images 1.7.3? i only have 1.7.3 and i dont found 1.7.2 version

vBFreak
10-09-2006, 10:50 PM
I have not tested it for myself, but I also dislike that 4homepages doesn't offer an archive to find older versions.

Others said that they've confirmed that it works with 1.7.3 aswell, so just give it a try :)

nader
01-05-2007, 07:53 PM
I already test this mod with 4iamges 1.7.4 it does not work fine. any update

web-rocket
02-15-2007, 05:20 PM
Yes a fix for 3.6.4 would be nice.

vBFreak
02-15-2007, 07:51 PM
It works fine with vBulletin 3.6.4 and 4images 1.7.2, so I would recommend you to use 4images 1.7.2 for now - however, don't forget to apply all the security fixes if you want to use 1.7.2! You can find them on the 4homepages website.

I don't know what's going on with this hack in the future but for now it seems mtha doesn't have the time to active develop and support it at the very moment, we have to be patient for now and I hope aswell as you to see a new version for this as soon as possible.

littleone
02-16-2007, 01:21 PM
Please give an update for 4images 1.7.4 with VB 3.6.4.

There is no point in going back to older versions of 4images considering the security problem.

..and after all I had bought VB considering this hack would be there ........

kai3k
02-16-2007, 08:05 PM
@ mtha: Please give us an update to work with 4images 1.7.4

and and guide how to use vbulletin 3.6.4 with 4images 1.7.4 would be great too.

Please!

Sadie Frost
02-18-2007, 09:00 PM
Ok this is a weird bug I have. Internet Explorer users can login without any problems through the picture galleries or forums page without any problems (no matter if remember me is checked or not).

If someone uses Firefox 1.0.4 or 1.0.5 logging in through the galleries page won't work. Also when you login through the forum (which works) you are still not logged in, in the galleries. Is that a Firefox bug??
I have this same problem in Firefox 2.0.0.1 - has anyone found a fix for that? Thanks :)

web-rocket
02-26-2007, 03:02 PM
Yes 1.7.4 would be great, I really dont want to use an older version.

pete_brady
03-08-2007, 09:33 PM
an update would certainly be appreciated....

Chicago_VLNU_4s
03-10-2007, 08:51 AM
nice. I wished I would have found this thread when I downloaded 4images, now I use PhotoPlog. Good job though!

kai3k
05-21-2007, 08:05 PM
please update to work with 4images 1.7.4

THANKS!

vBFreak
05-23-2007, 06:05 PM
..and after all I had bought VB considering this hack would be there ........

You shouldn't buy a vB just because of a hack, since every hack can get unsupported if the coder doesn't have the time to work on it voluntary.

I have this same problem in Firefox 2.0.0.1 - has anyone found a fix for that? Thanks :)

Though I'm not using Firefox, did you try to log in via the forums and go to the gallery after that (with clearing all old cookies and cache before)?

I've contacted mtha for you, maybe he'll give us a reply if and when he'll continue working on this.

airliner
09-28-2007, 05:57 AM
Hello,
Just bought vBulletin 3.6.8.
Will this mod be upgraded to the latest version.
I like 4imges very much and want it on my site forfuture plane-spotting images :)
Great mod by the way!
Me like and all credits to the developers doing and coding for Us public vBulletin nerds :)

Deidre
09-29-2007, 09:10 PM
will this be available for 3.6.x?

060606
10-03-2007, 10:35 AM
People need update for vBulletin 3.6.8! :)

Please, give it to us.

Yukino_AE
11-21-2007, 08:38 PM
has anyone been succsesful in making this work with 4images 1.7.4 and vb 3.6.x???

Guest191216
11-27-2007, 08:02 PM
Hello,

I'm also desperately looking for a 3.6.8. & 4 images 1.7.4. integration.
User Integration would be fine.
I am also willing to "donate" some bucks to get help on this.
Even more if I can get Help to get my existing gallery (1.000 pictures) migrated, so I could use the VBs' user management.

Help please :D

kh

ttkh
12-22-2007, 02:34 PM
The old hack doens't work on the new version of 4images 1.7.4? Does anyone have a new hack that would make vb3.6.8 work with 4images 1.7.4?

Q

Sun Boy
12-23-2007, 08:32 AM
ok here is my story
i made a new subdomain images.domain.com and forums.domain.com
my 4images is 1.7.4 and my VB is 3.6.8 patch 1

everything look fine EXCEPT 4images don’t recognize the use with the ID '1' as a user at all
i think that this is the reason way people are complaining that it kick them out ( just like me)
lucky me, i have a second user with the ID '2' which i give it a try to login and it login fine
it even log into the 4images control panel were i tried to search for the user ID '1' and i didn’t find it there

also i found something wrong at the file sessions.php and i fix it
at the lines 437 and 438 i found this

define('COOKIE_PATH', $cookiedomain);
define('COOKIE_DOMAIN', $cookiepath);

so i switch them to

define('COOKIE_PATH', $cookiepath);
define('COOKIE_DOMAIN', $cookiedomain);

Now what I want to know is, how can I fix the problem with the user ID ‘1’ ?

I will give it a try but I well appreciate some help

if someone is not sure about his cookie prefix then try this
http://www.iwebtool.com/http_headers
put your forum address right there and it will show you your forum cookie prefix

Tailfeathers
02-27-2008, 01:52 PM
Quick question. :)

I have integrated my board's user database with that of my gallery (I have integrated logins too, thanks to this hack). The gallery allows you to search by username and find all pictures by a certain username. Can someone tell me what exactly I should put in the memberinfo vBulletin template if I want a link that will say "See my pictures at the gallery" or something like that -- a link that will use the search option described earlier and show all oa specific user's pitcures?

Thanks!

Edit: figured it out myself.

WarriorDL
04-07-2008, 07:25 AM
Well... I have vBulletin 3.6.9 and 4Images 1.7.6 (both are the latest official releases).

I doubt anyone has figured out how to get them working together, but hopefully I can point someone who knows how to write PHP code properly in the right direction:

After looking over the vB database for the sessions, I noticed it has 4 more tables than the older version. I think the key one, as far as doing this user DB integration, is the idhash table. It appears that when the sessions reads the cookies, it's looking for that particular table information for the users!

Yukino_AE
04-07-2008, 04:06 PM
i am also looking for this to be able to work with vb 3.6.x and 4images 1.7.6 can ayone assist with this?

e7lew
04-29-2008, 08:50 PM
any help please ?

WarriorDL
05-21-2008, 12:27 PM
...ummm Wow. I *think* I may have figured it out.

You *cannot* go directly to the Gallery, as it reads directly from the FORUMS sessions and cookies.

So the FORUMS sessions and cookies must be CURRENT for you to enter either one. Thus, if you went to the Gallery FIRST and are not logged in, simply go to the Forums, then hit the link (if you have one) to the Gallery. Or simply refresh the Gallery after visiting the forums.

I think I read some posts here about log out problems from the Gallery? The solution there is simple too: Don't log out from there. If someone really needs to log out, they can do so from the Forums. Myself, I removed the Log In/Out code from my Gallery altogether, to prevent anyone from trying to log in or out from there.

And I am using vB 3.7!

WarriorDL
05-21-2008, 12:32 PM
Quick question. :)

I have integrated my board's user database with that of my gallery (I have integrated logins too, thanks to this hack). The gallery allows you to search by username and find all pictures by a certain username. Can someone tell me what exactly I should put in the memberinfo vBulletin template if I want a link that will say "See my pictures at the gallery" or something like that -- a link that will use the search option described earlier and show all oa specific user's pitcures?

Thanks!

Edit: figured it out myself.What did you do with this?

e7lew
05-21-2008, 01:56 PM
I have integrated vb 3.7.0 with 1.7.2 without any problems

WarriorDL
05-21-2008, 09:58 PM
What about 1.7.6?

eh9 daddy
07-04-2008, 09:56 AM
it works with 4images 1.7.6 an vb 3.7.2

nic_net
09-11-2008, 09:31 AM
Installed. 100% working with 3.7.3.

Thanks!

D-Block
01-09-2009, 11:57 PM
I have installed 4images 1.7.6 and this works with vb 3.8.0 perfectly ;)