vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   4images Gallery 1.7 + vB 3.0.x (update Oct 30) (https://vborg.vbsupport.ru/showthread.php?t=66335)

CreedFeed 06-23-2004 08:23 PM

I just installed twice and it still isn't working.

mtha, I just signed up for your forums/gallery. When I login through your gallery page, then close my browser, reopen, and go to your gallery it shows me as not logged in. ??

BlackxRam 06-23-2004 09:10 PM

MTHA!!!! YOU DID IT!!! IT WORKS COMPLETELY!!!! YOU ARE THE MAN! IF I WAS NEAR YOU I WOULD KISS YOU!!!!!! :) :) :) :)

ANYONE still having problems, start with a fresh install or fresh unhacked VB and 4IMAGES files... if you go slow you can't mess it up... ITS PERFECT! YOU ROCK!!! NO MORE LOGGING OUT!!! WOOHOO

STAND UP JOB MTHA!!!

CreedFeed 06-24-2004 12:57 AM

Mine seems to only remember sessions for admins now. Normal users are not remember as being logged in.

KTBleeding 06-24-2004 01:00 AM

Quote:

Originally Posted by CreedFeed
Mine seems to only remember sessions for admins now. Normal users are not remember as being logged in.

I'm pretty sure that's the same case as me.

mtha 06-24-2004 01:26 AM

Quote:

Originally Posted by CreedFeed
Mine seems to only remember sessions for admins now. Normal users are not remember as being logged in.

I was wondering why the code is still there, but my testing version was working fine (as I was being an administrator), so I didnt investigate more :D Sorry guys.


the new sessions.php in the first post was updated.

basically, you will only need to change the condition:

Look for:

PHP Code:

 if ($this->read_cookie_data("bbpassword") == md5($this->user_info['user_password'].''.VBLICENCE_NUMBER) && $this->user_info['user_level'] > USER_AWAITING) { 

replace with

PHP Code:

 if ($this->read_cookie_data("bbpassword") == md5($this->user_info['user_password'].''.VBLICENCE_NUMBER) && $this->user_info['user_level'] != USER_AWAITING) { 

this is applied for the sessions.php file in the first post. if you have the VBLICENCE_NUMBER here, just need to replace > USER_AWAITING with != USER_AWAITING
or you can remove the whole
&& $this->user_info['user_level'] != USER_AWAITING

well, I see this doesnt make alot of sence to force those who are awaiting for email confirmation not to be "remembered". but it was is the original code, so ... I just leave it there in case someone use it.


Quote:

mtha, I just signed up for your forums/gallery. When I login through your gallery page, then close my browser, reopen, and go to your gallery it shows me as not logged in. ??
the demo was NOT MY forum/gallery, I think it was MatrixGL. I dont have a demo for my testing work :) sorry.

CreedFeed 06-24-2004 02:22 AM

That works. Thanks.

One thing though, it is still not displaying that users are viewing the gallery in my vB forum. I went through all the steps several times and it still says Viewing Index (the forum index). Any ideas on this? Is that working on your forum?

mtha 06-24-2004 02:47 AM

Quote:

Originally Posted by CreedFeed
That works. Thanks.

One thing though, it is still not displaying that users are viewing the gallery in my vB forum. I went through all the steps several times and it still says Viewing Index (the forum index). Any ideas on this? Is that working on your forum?

are you sure you have someone browsing in your album at the time you check WOL?

yes it is working fine on my forum.

https://vborg.vbsupport.ru/showpost....5&postcount=35

instead of using album for token, use gallery in your case.

in gallery/include/sessions.php

PHP Code:

$this->user_location '/album/'.$this->get_user_location(); 

use gallery here too.

make sure that you have this lines correct in sessions.php too

PHP Code:

  function update_session() {
    global 
$site_db;
    
$sql "UPDATE ".SESSIONS_TABLE.
            SET lastactivity = 
$this->current_time, location = '$this->user_location'
            WHERE sessionhash = '
$this->session_id
            AND host = '
$this->user_ip'";
    
$site_db->query($sql); 

PHP Code:

    $this->session_id $this->generate_session_id();
    
$sql "INSERT INTO ".SESSIONS_TABLE.
            (sessionhash, userid, host, useragent, lastactivity, location, styleid) 
            VALUES 
            ('
$this->session_id', ".$this->user_info['user_id'].", '$this->user_ip', '". [PHP]%4$s 

SERVER['HTTP_USER_AGENT']."', $this->current_time, '$this->user_location', '".$this->read_cookie_data("bbstyleid")."')";
$site_db->query($sql);
[/PHP]


if it does not seem to work, do some test:

- access your album (either login or not login). Make sure that leave the browser stay IN ALBUM, dont go to forum :D
- login to your database, maybe using phpMyadmin
- browse to session table, and look for your record (based on your IP, maybe)
here's the query to show it:
Code:

SELECT * FROM `session` WHERE host = 'XXX.XXX.XXX.XXX';
replace XXX.XXX.XXX.XXX with your IP
- check the location field, and see if there's anything in there.

it should show /gallery/xxxx if you have everything correct.

mtha 06-24-2004 03:08 AM

It does seem like you didnt have your album location saved in database (looking from "guest" view).


if the above doesnt work, you may want to put some text before $this->user_location and see if the text is saved in database. :D

PHP Code:

function update_session() {
    global 
$site_db;
    
$sql "UPDATE ".SESSIONS_TABLE.
            SET lastactivity = 
$this->current_time, location = '$this->user_location'
            WHERE sessionhash = '
$this->session_id
            AND host = '
$this->user_ip'";
    
$site_db->query($sql); 


CreedFeed 06-24-2004 03:55 AM

I found the problem. I didn't set the case check in the vB functions_online.php file to be "gallery"

deathemperor 06-24-2004 04:27 AM

Quote:

Originally Posted by mtha
if you look at this hack, you will see some part if this one from him. He's a great coder though, and he does take care of all the important things of GVN. and you are really funny too. you think that I, having a administrator title, do no role in GVN life? :tired:

because I couldn't figure out what was your job in GVN, at that time I don't know you know php this well, I could guess that you must be a good coder since others admin take care the forums and you always like to hide yourself as you told me

Quote:

Originally Posted by mtha
No I dont. There're too many "music online" scripts, and I am not interested in this.

too many ? I don't think so. even it's so, all of them don't use the vb templates, they just use the user table of vb3 and it's impossible to manage via ACP.
perhaps it's unreasonable to ask you to make a hack I want however I believe vb3 communities really need a hack like that. vb.org has no music online script. I anyways hope you will change your mind somedays

mtha 06-24-2004 11:04 AM

Quote:

Originally Posted by CreedFeed
I found the problem. I didn't set the case check in the vB functions_online.php file to be "gallery"

Good to hear that.

BlackxRam 06-24-2004 07:01 PM

I posted this in the wrong post before, but the issue of logging out and closing the browser and returning DIRECTLY to the gallery does not show you as logged in. I am running IE and I have ran the steps 3 times and it doesnt work. It worked for the first few times as noted by my post above but now its doesnt work at all. I think Creed might be on to something, its just not picking up the vbcookie

KTBleeding 06-24-2004 10:09 PM

Quote:

Originally Posted by BlackxRam
I posted this in the wrong post before, but the issue of logging out and closing the browser and returning DIRECTLY to the gallery does not show you as logged in. I am running IE and I have ran the steps 3 times and it doesnt work. It worked for the first few times as noted by my post above but now its doesnt work at all. I think Creed might be on to something, its just not picking up the vbcookie

Works fine for me now.
I am having a few problems with the functions_online.php but I haven't done everything mtha was explaining yet.

Did you install this updated mod on the first post of this thread?

BlackxRam 06-24-2004 11:24 PM

Yes I Did, I did everything twice however it has stopped functioning. It worked the first day or so, but now it doesnt work. I am not hte only one as every member of my forum is having difficulty.

If you care to test it out goto my website www.mogusland.com register on the forums and then check out the multimedia link on the main page.

CreedFeed 06-25-2004 12:51 AM

Mine works now. Actually the problem I had was it was only remembering Admin users, not regular users. mtha posted a fix for this, which I think is included in the zip download now. Try redownloading the zip and reinstalling, or follow his instructions in a post a few points up.

Also note that I was having problems with IE caching. I found it easier to use Firefox or Mozilla to debug and test with. When it worked on those browsers I then made sure it worked in IE.

BlackxRam 06-25-2004 01:18 AM

If it doesnt work in IE why would it work in those other browsers lol ;) I donwload the zip this morning.

BlackxRam 06-25-2004 01:22 AM

Which post are you referring to? If i close my browser and return to the gallery directly I am not logged in...so which post has the fix for this?

mtha 06-25-2004 02:01 AM

Quote:

Originally Posted by BlackxRam
Which post are you referring to? If i close my browser and return to the gallery directly I am not logged in...so which post has the fix for this?

https://vborg.vbsupport.ru/showpost....7&postcount=45

better clean the cache files, and download the file from first post. make sure that you dont download the old one. (ie problem sometime)


Quote:

If it doesnt work in IE why would it work in those other browsers lol I donwload the zip this morning.
lol. I dont know why I still stick with a buggie IE. maybe just bcuz it's easy, eventhough I have both Mozilla + Firefox version, Netscape, Opera, for testing :D

I'm getting to like Firefox, maybe will switch someday

mtha 06-25-2004 02:11 AM

Quote:

Originally Posted by BlackxRam
Which post are you referring to? If i close my browser and return to the gallery directly I am not logged in...so which post has the fix for this?

If that doesnt fix, do this test:

go to your /4images/includes/sessions.php

look for

PHP Code:

function start_session($user_id GUEST$login_process 0) {
    global 
$site_db;
    
$this->user_info $this->load_user_info($user_id);
    if (
$this->user_info['user_id'] != GUEST && !$login_process) { 

Add bellow it:

PHP Code:

echo '- Cookie password: '.$this->read_cookie_data("bbpassword").'<br>- User encripted password: 'md5($this->user_info['user_password'].''.VBLICENCE_NUMBER).'<br>- Input: '$this->user_info['user_password'].''.VBLICENCE_NUMBER

Open a NEW window, go straight to your album (assuming that you already have your cookie select/saved before that)

Read the text on top of your browser, compare string 1 and 2, and see if they are the same.

if they are NOT, check the licence_number and the input string


remember to remove the echo line afterward, it's only for TESTING

BlackxRam 06-25-2004 03:50 AM

This Code doesnt display anything on my Gallery Page.

BlackxRam 06-25-2004 04:25 AM

I have edited every single file Again and still no go. If i close my browser and return to the gallery directly i am still logged out.

mtha 06-25-2004 05:33 AM

do you have your forum setup sessions ad .mogisland.com ? seems like you have your forum setup in a subdomain.

It seems like your album didnt read cookie at all

if you want to try,
look for

PHP Code:

function start_session($user_id GUEST$login_process 0) {
    global 
$site_db;
    
$this->user_info $this->load_user_info($user_id); 

add bellow:

PHP Code:

echo 'User Id: '.$user_id.' - '.$this->read_cookie_data("bbuserid").'<br>- Cookie password: '.$this->read_cookie_data("bbpassword").'<br>- User encripted password: 'md5($this->user_info['user_password'].''.VBLICENCE_NUMBER).'<br>- Input: '$this->user_info['user_password'].''.VBLICENCE_NUMBER



you have to open a NEW browser, in order to see the result.

mtha 06-25-2004 05:44 AM

lol.
I wrote the hack based on a standard vb version, which has bb as cookieprefix

You have your cookieprefix being moguslandforums

that's why

now you need to do some more work:

edit the sessions.php


replace all bb by moguslandforums


they are in bbuserid, bbpassword, bbstyleid (this one is not important), bblastvisit

Onkel_Tom 06-25-2004 11:32 AM

Hi all,
integration in vB3 works fine. I've just a problem when I logout out of the forum or the 4images Gallery I get a message saying that there was a problem to log me out.
Is that normal or missed I something ?

KTBleeding 06-25-2004 02:27 PM

Quote:

Originally Posted by Onkel_Tom
Hi all,
integration in vB3 works fine. I've just a problem when I logout out of the forum or the 4images Gallery I get a message saying that there was a problem to log me out.
Is that normal or missed I something ?

I believe that has to do with the..

Open: "forums/includes/functions.php"

Find:
$name = COOKIE_PREFIX . $name;

Replace with:
if ($name != 'sessionhash')
{
$name = COOKIE_PREFIX . $name;
}

Close and Save: forums/includes/functions.php


Someone correct me if I'm wrong?

Onkel_Tom 06-25-2004 05:25 PM

I have this kind of code in my functions.php of vB but still get the error while login off. I checked my code and the instructions three times to be sure that all parts are correct ;)

mtha 06-25-2004 07:12 PM

Quote:

Originally Posted by Onkel_Tom
Hi all,
integration in vB3 works fine. I've just a problem when I logout out of the forum or the 4images Gallery I get a message saying that there was a problem to log me out.
Is that normal or missed I something ?

https://vborg.vbsupport.ru/showpost....&postcount=161

that's the direct post where I have the fix, for vB 3.0.1

it should be included in the instruction file

pay attention to these lines:

in sessions.php

$url_logout = $url_app."login.php?do=logout&u={myuserid}";

includes/page_header.php
$myuserid = $user_info['user_id'];

BlackxRam 06-25-2004 09:26 PM

Quote:

Originally Posted by mtha
lol.
I wrote the hack based on a standard vb version, which has bb as cookieprefix

You have your cookieprefix being moguslandforums

that's why

now you need to do some more work:

edit the sessions.php


replace all bb by moguslandforums


they are in bbuserid, bbpassword, bbstyleid (this one is not important), bblastvisit


MTHA, That did it. I feel like such a tool that I didnt think of that, when I read your post I literally smacked my forehead. heheh.

Perhaps you should put something in your installation instructions now if people are having issues with the cookie to check that there cookie is 'bb' or something else because I have a cookie issue on my computer with a 'bb' prefix cookie and thats why I had to change mine. Perhaps some other people have a different cookie prefix as well and it wouldnt hurt to add that in your instructions.

My INTEGRATION works PERFECTLY so far and its all thanks to MTHA for following up on MatrixGL's work. I would say lets nominate this for Hack of the Month as it wasnt an easy integration to code up it seems heeheh.


Way to go MTHA, I salute you for being a pillar of the VB community! You literally ROCK! :)

Everyone with 4IMAGES and VB needs this hack. :)

mtha 06-26-2004 03:33 AM

Quote:

Originally Posted by BlackxRam
Perhaps you should put something in your installation instructions now if people are having issues with the cookie to check that there cookie is 'bb' or something else because I have a cookie issue on my computer with a 'bb' prefix cookie and thats why I had to change mine. Perhaps some other people have a different cookie prefix as well and it wouldnt hurt to add that in your instructions.

well, make life easier, I make the file ... more complicated, by adding some more variables on top.
have fun

Updated on the first post: (Update 06/25/2004)
https://vborg.vbsupport.ru/showpost....37&postcount=1

BlackxRam 06-26-2004 09:22 PM

Hey MTHA, I am having a text error where Registered board members are appearing as GUESTS and not Registered Members on the Comments Portion of the Gallery, any ideas? My Gallery is closed off to Guests and Only Registered Members can post so he didnt post as a guest.

mtha 06-27-2004 05:55 PM

Quote:

Originally Posted by BlackxRam
Hey MTHA, I am having a text error where Registered board members are appearing as GUESTS and not Registered Members on the Comments Portion of the Gallery, any ideas? My Gallery is closed off to Guests and Only Registered Members can post so he didnt post as a guest.

did you mean the picture's owner (poster)?

I didnt see the error over your http://www.mogusland.com/media/index.php

cant tell anything now, because I havent seen the errors nor the reason for it :P

could be cookie-prefix again?

I'm not going tu guess what the bug would be. I will try to fix it if I see it. Can you show me a demo?

BlackxRam 06-28-2004 03:05 AM

Ok, here you go.

http://www.mogusland.com/media/detai...?image_id=2095

If you look at the comments, under Lord-of-Shadow it says 'GUEST' Only that comment has been made after the integration and they say they don't have as many options as a registered user does to upload or add comments. It seems it recognizes them as a Registered User but the script labels them as a GUEST. Anyone else having this issue? It still works but its just displaying Members Incorrectly.

mtha 06-28-2004 05:12 AM

Quote:

Originally Posted by BlackxRam
Ok, here you go.

http://www.mogusland.com/media/detai...?image_id=2095

If you look at the comments, under Lord-of-Shadow it says 'GUEST' Only that comment has been made after the integration and they say they don't have as many options as a registered user does to upload or add comments. It seems it recognizes them as a Registered User but the script labels them as a GUEST. Anyone else having this issue? It still works but its just displaying Members Incorrectly.

dont see any comment there, cant add comments either (using my account - mtha)

I have no problem with comments at all, but I've been using 4images since vB2, and my board using different naming table, so ... it's just different.


since I still DONT see the problem, I cant give you a hint. Just a question. did you install 4images (the original version) and test it, did it work?


Well, you may want to run this querry, to see what comments you have for that image

SELECT * FROM `4images_comments` WHERE image_id=2095;

(change 4images_comments to whatever your comments table would be)

Onkel_Tom 06-28-2004 10:00 AM

Quote:

Originally Posted by mtha
https://vborg.vbsupport.ru/showpost....&postcount=161

that's the direct post where I have the fix, for vB 3.0.1

it should be included in the instruction file

pay attention to these lines:

in sessions.php

$url_logout = $url_app."login.php?do=logout&u={myuserid}";

includes/page_header.php
$myuserid = $user_info['user_id'];

thanks mtha,
I checked your instructions again, found no missmatch, put the files again on the server via ftp and now it works ;)
perhaps I forgot to ftp some files...

thanks for your great support on this Hack !

KTBleeding 06-28-2004 01:28 PM

Quote:

Originally Posted by Onkel_Tom
thanks for your great support on this Hack !

Yes, I agree with this 100%.

mtha 06-28-2004 06:13 PM

Quote:

Originally Posted by Onkel_Tom
perhaps I forgot to ftp some files...

this I cant help, heheh

Quote:

thanks for your great support on this Hack !
yo welcome

Onkel_Tom 06-29-2004 12:12 AM

If I click on the email Button of the comments in 4 images Gallery I get a incomplete URL
http://www.yourdomain.com/forum/sendmessage.?do=mailmember&u=XY

I think this is a problem of vB because they use variables for extensions.

How this can be fixed ?
the right url should look like:
http://www.yourdomain.com/forum/sendmessage.php?do=mailmember&u=XY

mtha 06-29-2004 02:55 AM

Quote:

Originally Posted by Onkel_Tom
If I click on the email Button of the comments in 4 images Gallery I get a incomplete URL
http://www.yourdomain.com/forum/send...ailmember&u=XY

I think this is a problem of vB because they use variables for extensions.

How this can be fixed ?
the right url should look like:
http://www.yourdomain.com/forum/sendmessage.php?do=mailmember&u=XY

I think you've downloaded the old session file.

you can either download the new file in the first post, or go to edit your sessions.php and there's a link there for messages, add the .php in there

http://www.yourdomain.com/forum/sendmessage.php?do=mailmember&u=XY

Onkel_Tom 06-29-2004 08:51 AM

thanks again mtha ;)

deathemperor 06-29-2004 01:54 PM

great, have just installed it successfully
/me clicks install ^^
gonna modify the style to fit my board
thanks mtha !


All times are GMT. The time now is 03:42 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.01699 seconds
  • Memory Usage 1,897KB
  • 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
  • (1)bbcode_code_printable
  • (10)bbcode_php_printable
  • (22)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