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 (https://vborg.vbsupport.ru/showthread.php?t=62020)

mtha 05-30-2004 05:43 PM

try this:


in album\includes\sessions.php

change $clientscript_md5 line to:
$clientscript_md5 = $url_app."clientscript/vbulletin_md5.js";


go to function delete_old_sessions() part,
find
$site_db->query($sql);

and replace by
// $site_db->query($sql);

see if it works.



Fix for LOGOUT link:

<edit file>

includes/page_header.php

</edit file>

<search for>

if ($user_info['user_level'] >= USER) {

$site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", $user_info['user_name'], $lang['lang_loggedin_msg']));

$user_box = $site_template->parse_template("user_logininfo");

$site_template->register_vars(array(

"user_box" => $user_box,

"user_loggedin" => 1,

"user_loggedout" => 0,

"is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0

));

$site_template->un_register_vars("user_logininfo");

unset($user_box);

}

</search for>

<replace>

//HN -Intergration with vB3 - BEGIN

if ($user_info['user_level'] >= USER) {

$site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", $user_info['user_name'], $lang['lang_loggedin_msg']));

$user_box = $site_template->parse_template("user_logininfo");

$myuserid = $user_info['user_id'];

$site_template->register_vars(array(

"user_box" => $user_box,

"myuserid" => $myuserid,

"user_loggedin" => 1,

"user_loggedout" => 0,

"is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0

));

$site_template->un_register_vars("user_logininfo");

unset($user_box);

}

//HN -Intergration with vB3 - END

</replace>

in sessions.php, replace

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

KTBleeding 05-30-2004 08:31 PM

Quote:

Originally Posted by mtha
try this:


in album\includes\sessions.php

change $clientscript_md5 line to:
$clientscript_md5 = $url_app."clientscript/vbulletin_md5.js";


go to function delete_old_sessions() part,
find
$site_db->query($sql);

and replace by
// $site_db->query($sql);

see if it works.

:ninja: !!!!!!!!!!!!! FINALLY!
SO far it's working perfectly! WOO! Seriously, this is so exciting, hahahaha.

Thanks a TON dude. I haven't tested it much, but so far it's passed without logging us out. YES!

mtha 05-31-2004 03:45 AM

Quote:

Originally Posted by vBFreak
Also I can't login in the admin-cp of 4images... so I can't administrate it...

You can't use the whole gallery correct with this hack... and the author? where is he/she? Shouldn't he/she give support and bugfixes for his/her "hack"? The complete hack is a major bug, what is the use of the gallery if you can't administrate and login? :mad:

The vB-File modification can you find a few pages before this... with it you can login and post and upload if nobody else visits the gallery...

:) there's another login code you need to work on, in /admin/admin_global.php. check out my attached file in the above post for detail.

vBFreak 06-04-2004 05:58 PM

hmmm but this code above works only if you do the following:

Find (4images /includes/sessions.php)
PHP Code:

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

And change it to:
PHP Code:

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

After I've flipped this, and made the above code changes it seems to work ;)

If you are logged in you can access the admin-cp via an edit- or delete-link of a picutre...

OGT 06-05-2004 06:29 AM

I am having a table prefix issue. what file in the 4images directory tells 4images what the vbulletin table prefix is?

not the 4images prefix, but the vbulletin prefix. i am getting errors that have the login page looking for dbname.tablename, when it needs to be looking at dbname.vb3_tablename

OGT 06-05-2004 05:46 PM

Well, I just went in and manually changed the user and session table in constants.php and template table in session.php, but now I am having group issues. Vbull groups didn't get ported over in this integration. is this possible or are the systems incompatible?

mtha 06-05-2004 07:06 PM

Quote:

Originally Posted by OGT
I am having a table prefix issue. what file in the 4images directory tells 4images what the vbulletin table prefix is?

not the 4images prefix, but the vbulletin prefix. i am getting errors that have the login page looking for dbname.tablename, when it needs to be looking at dbname.vb3_tablename

4images/include/constant.php

Make sure that you have correct prefix for these two variable.
// Table names

define('SESSIONS_TABLE', 'session');
define('USERS_TABLE', 'user');


Quote:

Well, I just went in and manually changed the user and session table in constants.php and template table in session.php, but now I am having group issues. Vbull groups didn't get ported over in this integration. is this possible or are the systems incompatible?
check the section bellow that
// User levels
define('GUEST', 0);
define('USER_AWAITING', 3);
define('USER', 2);
define('ADMIN', 6);

the number means groups.


... are you sure you did read the installation and intergration instruction correctly?

OGT 06-05-2004 07:12 PM

Those 4 groups ported fine, but The other 15 groups I have in Vbull didn't get ported. I have to setup 4images groups independently of the vbulletin groups?

My site uses more than just admin, registered users, unregistered users. It looks like I'd have to set up an array similar tot he user array in sessions.php for groups for it to integrate properly.

does 4images support users being members of several groups?

is there a way to get 4images to use some sortof is_member_of functionality to assign permissions or will it always be limited to primary groups?

BlackxRam 06-06-2004 07:52 AM

HEY KT, is the Cookie STILL holding? Did MTA's fix work for the logging out issue? What about logging into the ADMIN of 4images and staying logged in?

So many questions. Can the FIRST zip file in this POST be updated with the NEW changes? So I KNOW i wont miss anything? lol

mtha 06-06-2004 10:46 AM

Quote:

Originally Posted by OGT
Those 4 groups ported fine, but The other 15 groups I have in Vbull didn't get ported. I have to setup 4images groups independently of the vbulletin groups?

My site uses more than just admin, registered users, unregistered users. It looks like I'd have to set up an array similar tot he user array in sessions.php for groups for it to integrate properly.

does 4images support users being members of several groups?

is there a way to get 4images to use some sortof is_member_of functionality to assign permissions or will it always be limited to primary groups?

hehe, I see what you mean now.
For my album, I use another field for album level, so I dont think I'm going to write a fix for this.

However, if you wanna make another field for album_level, create this element in user table, with the default value = 2, and change the value for admins to 6 (or whatever admin value should be)

in this case, all members (including waiting for moderation ...) in any group are treated as user, except for those who are set to be admin.



for those who have some field in userfield table for "name", then you can use "userfield" instead of "user" table. In this case, you only need to creat another field for album level (using add user field) in user profile. => you can control the levels easier.


Quote:

HEY KT, is the Cookie STILL holding? Did MTA's fix work for the logging out issue? What about logging into the ADMIN of 4images and staying logged in?
heheh, my album work just fine, including login-logout-log in to adminCP ...

been using it for months without trouble.

good luck.


All times are GMT. The time now is 12:41 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.01367 seconds
  • Memory Usage 1,762KB
  • 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete