Risultati da 1 a 5 di 5
			
		- 
	12-10-2009, 17:13 #1Account disattivato    
 - Data Registrazione
- Oct 2009
- Messaggi
- 3
  plugin in forumhome_start plugin in forumhome_startUn saluto a tutta la board, 
 
 sto usando vbulletin 3.8.4
 
 plugin in questione : iB "Pro" Arcade Game Compatibility
 compreso nel pacchetto v3arcade 1.1.1
 
 devo inserire questo plugin in modo che entri in funzione
 solo quando viene aperta la home di v3arcade, oppure
 solo quando viene chiamata v3arcade,
 perchè mi va in conflitto con un'altro analogo plugin che chiama
 le stesse funzioni ma con 'Location:! diverse
 quindi trovandosi tutti e due in forumhome_start secondo l'Ordine di esecuzione che do ai 2 plugin
 chiaramente o funziona 1 o l'altra location, che singolarmente
 girano alla perfezione.
 chiaramente poi stessa cosa dovro' fare per l'altro prodotto.
 
 il codice del plugin è questo:
 spero di essermi spiegatoCodice:if ($_REQUEST['do'] == 'newscore' && $_REQUEST['act'] == 'Arcade') { require_once(DIR . '/includes/functions_arcade.php'); // Clean values $vbulletin->input->clean_array_gpc('p', array( 'gscore' => TYPE_UINT, 'gname' => TYPE_STR ) ); if (!$game = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "arcade_games AS arcade_games WHERE shortname='" . addslashes($vbulletin->GPC['gname']) . "'")) { exit; } // Create a session record. $db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_sessions (gameid,gamename,userid,start,sessiontype,challengeid,score,finish) VALUES ('" . $game['gameid'] . "', '" . addslashes($vbulletin->GPC['gname']) . "','" . $vbulletin->userinfo['userid'] . "', '" . TIMENOW . "', 1, 0, '" . $vbulletin->GPC['gscore'] . "', '" . TIMENOW . "')"); // Fetch the ID number of the session we just inserted. $lastid = $db->insert_id(); header('Location: arcade.php?sessdo=burn&id=' . $lastid . 'µone=' . getmicrotime()); exit; } if ($_REQUEST['do'] == 'verifyscore' && $_REQUEST['autocom'] == 'arcade') { // Get two random numbers to do our score verification $randomvar1 = rand(1, 25); $randomvar2 = rand(1, 25); // Bake a Cookie vbsetcookie('v3arcade_v32_cookie', $randomvar1 . ',' . $randomvar2, permanent); // Return the values echo '&randchar=' . $randomvar1 . '&randchar2=' . $randomvar2 . '&savescore=1&blah=OK'; exit(); } if ($_REQUEST['do'] == 'savescore' && $_REQUEST['autocom'] == 'arcade') { require_once(DIR . '/includes/functions_arcade.php'); $vbulletin->input->clean_array_gpc('p', array( 'gscore' => TYPE_UINT, 'arcadegid' => TYPE_NUM, 'enscore' => TYPE_NUM, 'gname' => TYPE_STR ) ); // Get a cookie from the jar $randomvars = explode(',',$_COOKIE[COOKIE_PREFIX . 'v3arcade_v32_cookie']); // If the checksum values do not match, display an error to the user. if( $vbulletin->GPC['enscore'] != ($vbulletin->GPC['gscore'] * $randomvars[0] ^ $randomvars[1]) ) { print_no_permission(); } // Check to see game name is one file if(!$game = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "arcade_games AS arcade_games WHERE shortname='" . addslashes($vbulletin->GPC['gname']) . "'")) { exit; } // Create a session record. $db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_sessions (gameid,gamename,userid,start,sessiontype,challengeid,score,finish) VALUES ('" . $game['gameid'] . "', '" . addslashes($vbulletin->GPC['gname']) . "','" . $vbulletin->userinfo['userid'] . "', '" . TIMENOW . "', 1, 0, '" . $vbulletin->GPC['gscore'] . "', '" . TIMENOW . "')"); // Fetch the ID number of the session we just inserted. $lastid = $db->insert_id(); header('Location: arcade.php?sessdo=burn&id=' . $lastid . 'µone=' . getmicrotime()); // Clear the cookie values vbsetcookie('v3arcade_v32_cookie', ''); exit; } 
 
 
 Ringrazio anticipatamente
 Saluti
 Dott.New
 
 .
 
- 
	14-10-2009, 13:48 #2Dovrai sostituire un po' di tutto per far funzionare due plugin con lo stesso nome interno sullo stesso forum. Con nomi identici non potranno mai funzionare, anche se cambi ordine di esecuzione. Giovanni
 http://www.trimelli.com/
 
 Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.
 
 
- 
	14-10-2009, 19:22 #3Account disattivato    
 - Data Registrazione
- Oct 2009
- Messaggi
- 3
 si certo, ma io vorrei farlo attivare soltanto quando si apre l'arcade 
 invece cosi è sempre attivo.
 Ho provato a spostarlo dalla forumhome_start ma ma non funziona,
 quindi mi chiedevo appunto se era possibile farlo attivare soltanto
 quando arriva la richiesta da arcade.php
 
- 
	16-10-2009, 11:04 #4Solo se arcade.php abbia un suo hook, altrimenti la vedo molto difficile. Giovanni
 http://www.trimelli.com/
 
 Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.
 
 
- 
	16-10-2009, 20:20 #5Account disattivato    
 - Data Registrazione
- Oct 2009
- Messaggi
- 3
 ok molte grazie per il grande aiuto ricevuto, 2 parole e si liquida il problema. 
 
   
 
Discussioni Simili
- 
  vBulletin 3.7.x pluginDi )AleX( nel forum VBulletin 3Risposte: 2Ultimo Messaggio: 03-10-2008, 16:56
- 
  vBulletin 3.7.x [PlugIn] y2kswDi wb08 nel forum VBulletin 3Risposte: 3Ultimo Messaggio: 09-09-2008, 23:12
- 
  vBulletin 3.7.x ricerca pluginDi )AleX( nel forum VBulletin 3Risposte: 6Ultimo Messaggio: 05-05-2008, 21:07
- 
  vBulletin 3.6.x Nuovo PluginDi Kappaloris nel forum VBulletin 3Risposte: 1Ultimo Messaggio: 06-09-2007, 13:07
- 
  vBulletin 3.6.x plugin youtubeDi djmarvin nel forum VBulletin 3Risposte: 14Ultimo Messaggio: 27-11-2006, 10:50


 
					
					
					
					
				 
			
Segnalibri