Visualizzazione risultati 1 fino 6 di 6

Discussione: [phpbb 3.1-tag] Errore php (era "table tag board")

  1. #1
    Guest

    Predefinito [phpbb 3.1-tag] Errore php (era "table tag board")

    ho istallato la tag in un forum phpbb 3.1 quanto vado a ad il forum mi da il seguente errore:

    Codice PHP:
    Parse error: syntax error, unexpected '=' in /membri/narutogogo/tag_board.php on line 3
    ho cancellato e ricreato la table ma non mi funziona.

    ps:ho svuotato la cache.

  2. #2
    Guest

    Predefinito

    posta la riga 3 e le righe prima di questa, del file tag_board.php


    Ciao!

  3. #3
    Guest

    Predefinito

    lo ho postato quasi tutto:

    Codice PHP:
    <?php
    // PARAMETRI DA IMPOSTARE:

    tag_board_usr = "admin"
    tag_board_psw = "pas"
    tag_board_msg = "30"

    // NON MODIFICARE QUI SOTTO
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include(
    $phpbb_root_path . 'common.'.$phpEx);

    $user->session_begin();
    $user->setup('viewforum');
    if(isset(
    $_GET['mode'])){
    $mode = $_GET['mode'];
    }
    else{
    $mode = "";
    }
    if(isset(
    $_GET['action'])){
    $action = $_GET['action'];
    }
    else{
    $action = "";
    }
    $smilies_path = $config['smilies_path'];
    $font_style = '<font style="color: #333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 0.8em">';
    $button_style = 'style="background-color: #ddd; color: #333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 0.7em"';

    function
    request_tag_board_var($mode, $u){

    global
    $db;

    $sql = 'SELECT *
    FROM '
    . USERS_TABLE . "
    WHERE user_id =
    $u";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $var = $row[$mode];

    return
    $var;
    }

    function
    tag_board_smilies_rep($str){

    global
    $phpbb_root_path, $smilies_path;

    $str = str_replace(':grin:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_biggrin.gif" border="0" alt="Very Happy">', $str);
    $str = str_replace(':smile:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_smile.gif" border="0" alt="Smile">', $str);
    $str = str_replace(':wink:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_wink.gif" border="0" alt="Wink">', $str);
    $str = str_replace(':sad:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_sad.gif" border="0" alt="Sad">', $str);
    $str = str_replace(':eek:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_surprised.gif" border="0" alt="Surprised">', $str);
    $str = str_replace(':shock:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_eek.gif" border="0" alt="Shocked">', $str);
    $str = str_replace(':???:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_confused.gif" border="0" alt="Confused">', $str);
    $str = str_replace(':cool:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_cool.gif" border="0" alt="Cool">', $str);
    $str = str_replace(':lol:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_lol.gif" border="0" alt="Laughing">', $str);
    $str = str_replace(':mad:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_mad.gif" border="0" alt="Mad">', $str);
    $str = str_replace(':razz:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_razz.gif" border="0" alt="Razz">', $str);
    $str = str_replace(':oops:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_redface.gif" border="0" alt="Embarrassed">', $str);
    $str = str_replace(':cry:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_cry.gif" border="0" alt="Crying or Very Sad">', $str);
    $str = str_replace(':evil:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_evil.gif" border="0" alt="Evil or Very Mad">', $str);
    $str = str_replace(':twisted:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_twisted.gif" border="0" alt="Twisted Evil">', $str);
    $str = str_replace(':roll:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_rolleyes.gif" border="0" alt="Rolling Eyes">', $str);
    $str = str_replace(':!:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_exclaim.gif" border="0" alt="Exclamation">', $str);
    $str = str_replace(':?:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_question.gif" border="0" alt="Question">', $str);
    $str = str_replace(':idea:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_idea.gif" border="0" alt="Idea">', $str);
    $str = str_replace(':arrow:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_arrow.gif" border="0" alt="Arrow">', $str);
    $str = str_replace(':neutral:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_neutral.gif" border="0" alt="Neutral">', $str);
    $str = str_replace(':mrgreen:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_mrgreen.gif" border="0" alt="Mr. Green">', $str);
    $str = str_replace(':geek:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_geek.gif" border="0" alt="Geek">', $str);
    $str = str_replace(':ugeek:', '<img src="'.$phpbb_root_path.$smilies_path.'/icon_e_ugeek.gif" border="0" alt="Uber Geek">', $str);

    return
    $str;
    }

    switch (
    $mode){
    case
    'admin':
    session_start();
    if(!isset(
    $_SESSION['loggedin'])){
    switch (
    $action){
    default:
    ?>
    <form action="tag_board.php?mode=admin&action=login" method="post">
    <table width="100%">
    <tr>
    <td width="50%" align="right"><?php echo $font_style ?>Username :<?php echo "</font>"; ?></td>
    <td width="50%" align="left"><input type="text" name="usr" size="15" maxlength="15"></td>
    </tr>
    <tr>
    <td align="right"><?php echo $font_style ?>Password :<?php echo "</font>"; ?></td>
    <td align="left"><input name="psw" type="password" size="15" maxlength="15"></td>
    </tr>
    <tr>
    <td colspan="2" align="center"><input type="submit" value="Login" <?php echo $button_style ?>></td>
    </tr>
    </table>
    </form>
    <?php
    break;
    case
    'login':
    if(
    $_POST['usr'] != $tag_board_usr OR $_POST['psw'] != $tag_board_psw){
    ?>

  4. #4
    Guest

    Predefinito

    Modifica in questo modo i 3 paramteri all'inizio:

    $tag_board_usr = "admin";
    $tag_board_psw = "pas";
    $tag_board_msg = "30";

    E poi potrai personalizzarli.


    Ciao!

  5. #5
    Guest

    Predefinito

    -cut-

    scusa non avevo aggiornato
    Ultima modifica di narutogogo : 28-04-2008 alle ore 18.03.21

  6. #6
    Guest

    Predefinito

    Non hai messo il carattere $ davanti alle tre variabili.


    Ciao!

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •