vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   where does this code go? (https://vborg.vbsupport.ru/showthread.php?t=218448)

z0diac 07-12-2009 06:27 PM

where does this code go?
 
I'm running a 3rd-party uploading program. Works fine in IE, but not Firefox. The author of it said it has something to do with sessionID not being passed on by Firefox, and Adobe only supporting IE, etc, etc, etc.

He gave me some extra code that has to be added to a template, but I'm not sure what template. He said:

You should put this code to the top of file processing script.

Here is code to restore session:

//trying restore browser cookie
if(isset($_POST['MultiPowUpload_browserCookie']))
{
$cookies = split(";", $_POST['MultiPowUpload_browserCookie']);
foreach($cookies as $value)
{
$namevalcookies = split("=", $value);
$browsercookie[trim($namevalcookies[0])] = trim($namevalcookies[1]);
}
$_COOKIE = $browsercookie;
}

//restore session if possible
if(isset($browsercookie) && isset($browsercookie['PHPSESSID']))
{
session_id($browsercookie['PHPSESSID']);
session_start();
}

-- anyone know where this code would go to restore a Firefox session when attaching files?

HMBeaty 07-12-2009 06:29 PM

Well, I'm not sure exactly where that would go.... but I can definately tell you that you can't add that to a template

Lynne 07-12-2009 08:10 PM

A "file processing script" usually means code - like a php file. It is not a template (you can't put code in a template). As for which file, you'll have to ask him.


All times are GMT. The time now is 12:23 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.01121 seconds
  • Memory Usage 1,706KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete