Jump to content

LBJerryH

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

LBJerryH's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Doesn't anyone have a clue how to do this????
  2. I am using a multi quote hack on my message board and it currently uses to images, one to add the quote and one to remove it. I want it to where there is only one button. You click to add and the image switches to the remove image and then if you want to remove it, you click it and it goes back to the add button. Is this possible?? Here is the hack that I added: # #-----[ OPEN ]------------------------------------------ # viewtopic.php # #-----[ FIND ]------------------------------------------ # $quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>'; # #-----[ AFTER, ADD ]------------------------------------------ # // DEBUT MOD Multiquote $post_list_in_cookie = $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_multiquote_' . $topic_id]; if(($post_list_in_cookie != '') && (strstr($post_list_in_cookie, '|' . $postrow[$i]['post_id'] . '|') != FALSE)) { $quote_add_class = 'display_none'; $quote_remove_class = 'display_inline'; } else { $quote_add_class = 'display_inline'; $quote_remove_class = 'display_none'; } $quote_add_img = '<img id="quote_add_' . $postrow[$i]['post_id'] . '" src="' . $images['MuQu_icon_quote_add'] . '" alt="' . $lang['MuQu_Add_to_quote_list'] . '" title="' . $lang['MuQu_Add_to_quote_list'] . '" onclick="cookiePostAdd(' . $topic_id . ', ' . $postrow[$i]['post_id'] . ', \'' . $board_config['cookie_name'] . '\');" style="cursor: pointer;" class="' . $quote_add_class . '" />'; $quote_remove_img = '<img id="quote_remove_' . $postrow[$i]['post_id'] . '" src="' . $images['MuQu_icon_quote_remove'] . '" alt="' . $lang['MuQu_Remove_from_quote_list'] . '" title="' . $lang['MuQu_Remove_from_quote_list'] . '" onclick="cookiePostRemove(' . $topic_id . ', ' . $postrow[$i]['post_id'] . ', \'' . $board_config['cookie_name'] . '\');" style="cursor: pointer;" class="' . $quote_remove_class . '" />'; // FIN MOD Multiquote # #-----[ FIND ]------------------------------------------ # 'QUOTE_IMG' => $quote_img, # #-----[ AFTER, ADD ]------------------------------------------ # // DEBUT MOD Multiquote 'QUOTE_ADD_IMG' => $quote_add_img, 'QUOTE_REMOVE_IMG' => $quote_remove_img, // FIN MOD Multiquote # #-----[ OPEN ]------------------------------------------ # posting.php # #-----[ FIND ]------------------------------------------ # // // Signature toggle selection // # #-----[ BEFORE, ADD ]------------------------------------------ # // DEBUT MOD Multiquote if($mode == 'reply' && !$preview) { // Récupération du cookie. $post_list_in_cookie = $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_multiquote_' . $topic_id]; if($post_list_in_cookie != '') { // Génération de la liste des id. $post_list_in_cookie = str_replace('||', '|', $post_list_in_cookie); $posts_to_quote = explode ('|', $post_list_in_cookie); $sql_posts_list = ''; foreach($posts_to_quote as $post_to_quote) { // Si on est en mode "quote", on a déjà cité le message courrant, on ne l'inèsre donc pas dans la liste. if($post_to_quote != '' && ($post_to_quote != $post_id)) { $sql_posts_list .= ($sql_posts_list == '') ? $post_to_quote : ', ' . $post_to_quote; } } // Si l'on a des posts à citer, on les ajoute en tête de message. if($sql_posts_list != '') { $sql_quote = "SELECT p.post_id, p.poster_id, u.username AS post_username, t.post_text, t.bbcode_uid FROM " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " t, " . USERS_TABLE . " u WHERE p.post_id = t.post_id AND p.poster_id = u.user_id AND p.post_id IN ($sql_posts_list) AND p.topic_id = $topic_id ORDER BY p.post_id DESC"; if (!($result_quote = $db->sql_query($sql_quote))) { message_die(GENERAL_ERROR, 'Could not obtain quotes', '', __LINE__, __FILE__, $sql_quote); } $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replace_word); // Ajout des posts cités un à un. while($row_quote = $db->sql_fetchrow($result_quote)) { // Nettoyage du nom d'utilisateur. $quote_username = trim($row_quote['post_username']); $message_quote = $row_quote['post_text']; // Nettoyage des bbcode uid. if($row_quote['bbcode_uid'] != '') { $message_quote = preg_replace('/\([a-z0-9]?)' . $row_quote['bbcode_uid'] . '/s', '', $message_quote); } // Conversions... $message_quote = str_replace('<', '<', $message_quote); $message_quote = str_replace('>', '>', $message_quote); $message_quote = str_replace('<br />', "\n", $message_quote); $message_quote = '[quote="' . $quote_username . '"]' . $message_quote . "[/quote]\n\n"; // Gestion de la censure. if (!empty($orig_word)) { $message_quote = (!empty($message_quote)) ? preg_replace($orig_word, $replace_word, $message_quote) : ''; } // Ajout en tête de message. $message = $message_quote . $message; } } } } // FIN MOD Multiquote # #-----[ OPEN ]------------------------------------------ # includes/functions_post.php # #-----[ FIND ]------------------------------------------ # include($phpbb_root_path . 'includes/functions_search.'.$phpEx); $current_time = time(); # #-----[ AFTER, ADD ]------------------------------------------ # // DEBUT MOD Multiquote $cookiename = $board_config['cookie_name']; $cookiepath = $board_config['cookie_path']; $cookiedomain = $board_config['cookie_domain']; $cookiesecure = $board_config['cookie_secure']; setcookie($cookiename . '_multiquote_' . $topic_id, '', FALSE); // FIN MOD Multiquote # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # ?> # #-----[ BEFORE, ADD ]------------------------------------------ # // DEBUT MOD Multiquote $lang['MuQu_Add_to_quote_list'] = 'Ajouter à liste des messages à citer'; $lang['MuQu_Remove_from_quote_list'] = 'Retirer de la liste des messages à citer'; // FIN MOD Multiquote # #-----[ OPEN ]------------------------------------------ # templates/AdInfinitum/AdInfinitum.cfg # #-----[ FIND ]------------------------------------------ # ?> # #-----[ BEFORE, ADD ]------------------------------------------ # // DEBUT MOD Multiquote $images['MuQu_icon_quote_add'] = "$current_template_images/{LANG}/icon_quote_add.gif"; $images['MuQu_icon_quote_remove'] = "$current_template_images/{LANG}/icon_quote_remove.gif"; # #-----[ OPEN ]------------------------------------------ # templates/AdInfinitum/viewtopic_body.tpl # #-----[ FIND ]------------------------------------------ # <table width="100%" cellspacing="2" cellpadding="2" border="0"> # #-----[ BEFORE, ADD ]------------------------------------------ # <script type="text/javascript" src="templates/multiquote.js"></script> # #-----[ IN-LINE, FIND ]------------------------------------------ # {postrow.QUOTE_IMG} # #-----[ AFTER, ADD ]------------------------------------------ # {postrow.QUOTE_ADD_IMG}{postrow.QUOTE_REMOVE_IMG} # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM Any help is a appreciated. Thanks!
  3. [quote author=wardo link=topic=104681.msg417977#msg417977 date=1155909358] You could store the log in table on either database and when you have checked for a successful log in in your script you could just include a different connection to the database as required. [/quote] Ok, that makes since. Now how would I go about doing this? My database skills are lacking. If you could help me with this, I would really appreciate it.
  4. I need some help on this. I need to have it where when someone logs into my main site, one database, that login passes to the second database. One login for two databases. Can this be done??? The way the site is set up is the main site is www.fuelmyfaith.com and the secondary site is set up like this: www.fuelmyfaith.com/pligg. They are on 2 seperate databases running their own PHP scripts andI want one login for both. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.