smilles onder quick replay

Installatie lukt niet? Plotseling een foutmelding. Of weet je niet hoe iets werkt. Problemen met phpBB2 kun je in dit archief opzoeken.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Marian
Berichten: 79
Lid geworden op: 16 mar 2003, 16:45
Locatie: Den Helder
Contacteer:

smilles onder quick replay

Bericht door Marian » 19 jun 2004, 07:29

Hoi iedereeen,

ik een quickreplay op mijn site staan nu wil ik ook van die smiles de instaltie gaat goed.
alleen komt het bij mij er zo uit testaan:
http://www.opelpower.xplosiv-hosting.co ... c.php?t=91

ik heb deze code in het forum gezet:

Code: Selecteer alles

viewtopic.php 

# 
#-----[ FIND ]--------------------------------------------- 
# 

   if (!$userdata['session_logged_in']) 
   { 
      $quick_reply_form .= $lang['Username'] . ":&<input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />"; 
   } 

   $quick_reply_form .= " 
      <textarea class='post' name='message' rows='10' cols='50' wrap='virtual'></textarea><br /> 

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# 

      <input type='button' name='quoteselected' class='liteoption' value='Quote selected' onclick='javascript:quoteSelection()'>& & & & & & & & & & & & & & & & & 
      <input type='button' name='SmilesButt' class='liteoption' value='Smilies' onclick='openAllSmiles();'><br/> 
als ik naar de site ga en dan een topic opent zie ik alleen maar &&&&&&& en als ik op meer smiles klik dan krijg ik ze wel te zien maar als ik er op klik krijg ik geen smile code in mijn quick replay.

als jullie de hele code wil hebben moeten jullie het maar even zeggen. :wink:

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 19 jun 2004, 12:45

http://www.opelpower.xplosiv-hosting.co ... nks.js.php

Code: Selecteer alles

var interval = ;
var link_num = ;
Dit klopt niet. Wat is de source van dit bestand?

Marian
Berichten: 79
Lid geworden op: 16 mar 2003, 16:45
Locatie: Den Helder
Contacteer:

Bericht door Marian » 19 jun 2004, 14:32

mosymuis schreef:http://www.opelpower.xplosiv-hosting.co ... nks.js.php

Code: Selecteer alles

var interval = ;
var link_num = ;
Dit klopt niet. Wat is de source van dit bestand?
source??? wat is dat? :?

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 19 jun 2004, 14:41

De bron; de code.

Marian
Berichten: 79
Lid geworden op: 16 mar 2003, 16:45
Locatie: Den Helder
Contacteer:

Bericht door Marian » 19 jun 2004, 21:16

mosymuis schreef:De bron; de code.
okeej haha sorry maar hier als nog de code:

Code: Selecteer alles

# 
#-----[ OPEN ]--------------------------------------------- 
#You should modify all the templates that you have 

template/XXX/viewtopic_body.tpl 

# 
#-----[ FIND ]--------------------------------------------- 
# 

{QUICK_REPLY_FORM} 

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# 

<script language='JavaScript'> 
   function openAllSmiles(){ 
      smiles = window.open('posting.php?mode=smilies', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250'); 
      smiles.focus(); 
      return false; 
   } 

   function quoteSelection() { 

      theSelection = false; 
      theSelection = document.selection.createRange().text; // Get text selection 

      if (theSelection) { 
         // Add tags around selection 
         emoticon( '[quote]\n' + theSelection + '\n[/quote]\n'); 
         document.post.message.focus(); 
         theSelection = ''; 
         return; 
      }else{ 
         alert('Select a text anywhere on a page and try again'); 
      } 
   } 

   function storeCaret(textEl) { 
      if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate(); 
   } 

   function emoticon(text) { 
      if (document.post.message.createTextRange && document.post.message.caretPos) { 
         var caretPos = document.post.message.caretPos; 
         caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; 
         document.post.message.focus(); 
      } else { 
         document.post.message.value  += text; 
         document.post.message.focus(); 
      } 
   } 
</script> 

# 
#-----[ OPEN ]--------------------------------------------- 
#This is for if you have installed quick reply with quotes (I have tested on version 1.1.3) but it should work on all. 

viewtopic.php 

# 
#-----[ FIND ]--------------------------------------------- 
# 

   if (!$userdata['session_logged_in']) 
   { 
      $quick_reply_form .= $lang['Username'] . ":&<input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />"; 
   } 

   $quick_reply_form .= "<textarea name='input' rows='10' cols='50' wrap='virtual' class='post''></textarea><br /> 

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# 

      <input type='button' name='quoteselected' class='liteoption' value='Quote selected' onclick='javascript:quoteSelection()'>& & & & & & & & & & & & & & & & & 
      <input type='button' name='SmilesButt' class='liteoption' value='Smilies' onclick='openAllSmiles();'><br/> 

# 
#-----[ OPEN ]--------------------------------------------- 
#This is for if you have installed quick reply (I have tested on version 1.0.5) but it should work on all. 

viewtopic.php 

# 
#-----[ FIND ]--------------------------------------------- 
# 

   if (!$userdata['session_logged_in']) 
   { 
      $quick_reply_form .= $lang['Username'] . ":&<input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />"; 
   } 

   $quick_reply_form .= " 
      <textarea class='post' name='message' rows='10' cols='50' wrap='virtual'></textarea><br /> 

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# 

      <input type='button' name='quoteselected' class='liteoption' value='Quote selected' onclick='javascript:quoteSelection()'>& & & & & & & & & & & & & & & & & 
      <input type='button' name='SmilesButt' class='liteoption' value='Smilies' onclick='openAllSmiles();'><br/> 

# 
#-----[ EOM ]-------------------------------------- 
# 
:D

Marian
Berichten: 79
Lid geworden op: 16 mar 2003, 16:45
Locatie: Den Helder
Contacteer:

Bericht door Marian » 20 jun 2004, 08:28

vinden jullie dit ook moeilijk ofzo?
als hier niemand uit komt zeg het dan even dan.
En is er dan een snel reageren waar die smiles er al bij zit????

Groetjes marian :bier:

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 20 jun 2004, 14:13

Marian schreef:okeej haha sorry maar hier als nog de code:
Ik bedoelde dus de bron van links.js.php.

Marian schreef:En is er dan een snel reageren waar die smiles er al bij zit????
Volgens mij zijn er zelfs verschillende hacks die dit standaard al hebben, deze zoieso:
http://www.phpbbhacks.com/viewhack.php?id=586

Marian
Berichten: 79
Lid geworden op: 16 mar 2003, 16:45
Locatie: Den Helder
Contacteer:

Bericht door Marian » 20 jun 2004, 15:49

mosymuis schreef:
Marian schreef:okeej haha sorry maar hier als nog de code:
Ik bedoelde dus de bron van links.js.php.

Marian schreef:En is er dan een snel reageren waar die smiles er al bij zit????
Volgens mij zijn er zelfs verschillende hacks die dit standaard al hebben, deze zoieso:
http://www.phpbbhacks.com/viewhack.php?id=586
okeej de code van links.js.php is:

Code: Selecteer alles

<?php
/***************************************************************************
*							links.js.php
*                            -------------------
*  MOD add-on page. Contains GPL code copyright of phpBB group.
*  Author: OOHOO < webdev@phpbb-tw.net >
*  Author: Stefan2k1 and ddonker from www.portedmods.com
*  Demo: http://phpbb-tw.net/
*  Version: 1.0.X - 2002/03/22 - for phpBB RC serial, and was named Related_Links_MOD
*  Version: 1.1.0 - 2002/04/25 - Re-packed for phpBB 2.0.0, and renamed to Links_MOD
*  Version: 1.2.0 - 2003/06/15 - Enhanced and Re-packed for phpBB 2.0.4
*  Version: 1.2.1 - 2003/10/15 - Enhanced by CRLin
***************************************************************************/
/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/ 

define('IN_PHPBB', true);

$phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . "common.$phpEx");


//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
	$phpver = phpversion();

	if($phpver >= "4.0.4pl1")
	{
		if(extension_loaded("zlib"))
		{
			ob_start("ob_gzhandler");
		}
	}
	else if($phpver > "4.0")
	{
		if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
		{
			if(extension_loaded("zlib"))
			{
				$do_gzip_compress = TRUE;
				ob_start();
				ob_implicit_flush(0);

				header("Content-Encoding: gzip");
			}
		}
	}
}

header ("Cache-Control: no-store, no-cache, must-revalidate");
header ("Cache-Control: pre-check=0, post-check=0, max-age=0", false);
header ("Pragma: no-cache");
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$template->set_filenames(array(
	'body' => "links_js_body.tpl"
));

//
// Grab data
//
$sql = "SELECT *
		FROM ". LINK_CONFIG_TABLE;
	if(!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, "Could not query Link config information", "", __LINE__, __FILE__, $sql);
	}
	
	while( $row = $db->sql_fetchrow($result) )
	{
		$link_config_name = $row['config_name'];
		$link_config_value = $row['config_value'];
		$link_config[$link_config_name] = $link_config_value;
		$link_self_img = $link_config['site_logo'];
		$site_logo_height = $link_config['height'];
		$site_logo_width = $link_config['width'];
		$display_interval = $link_config['display_interval'];
		$display_logo_num = $link_config['display_logo_num'];
	}

$sql = "SELECT link_id, link_title, link_logo_src
	FROM " . LINKS_TABLE . "
	WHERE link_active = 1
	ORDER BY link_hits DESC";

// If failed just ignore
if( $result = $db->sql_query($sql) )
{
	$links_logo = "";
	while($row = $db->sql_fetchrow($result))
	{
		//if (empty($row['link_logo_src'])) $row['link_logo_src'] = 'images/links/no_logo88a.gif';
		if ($row['link_logo_src']) {
			$links_logo .= ('\'<a href="' . append_sid("links.$phpEx?action=go&link_id=" . $row['link_id']) . '" target="_blank"><img src="' . $row['link_logo_src'] . '" alt="' . $row['link_title'] . '" width="' . $site_logo_width . '" height="' . $site_logo_height . '" border="0" hspace="1" /></a>\',' . "\n");
		}
	}

	if ($links_logo) {
		$links_logo = substr($links_logo, 0, -2);

		$template->assign_vars(array(
			'S_CONTENT_ENCODING' => $lang['ENCODING'],
			'T_BODY_BGCOLOR' => '#'.$theme['td_color1'],

			'DISPLAY_INTERVAL' => $display_interval,
			'DISPLAY_LOGO_NUM' => $display_logo_num,
			'LINKS_LOGO' => $links_logo
		));
	}
}

$template->pparse("body");

$db->sql_close();
//
// Compress buffered output if required
// and send to browser
//
if($do_gzip_compress)
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack("V", $gzip_crc);
	echo pack("V", $gzip_size);
}

exit;
?>

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 20 jun 2004, 16:04

Code: Selecteer alles

      $display_interval = $link_config['display_interval'];
      $display_logo_num = $link_config['display_logo_num'];
Deze worden niet ingevuld, heb je de database update wel uitgevoerd? :roll:

Marian
Berichten: 79
Lid geworden op: 16 mar 2003, 16:45
Locatie: Den Helder
Contacteer:

Bericht door Marian » 20 jun 2004, 16:15

ja

Code: Selecteer alles

<?php
/***************************************************************************
*							links.js.php
*                            -------------------
*  MOD add-on page. Contains GPL code copyright of phpBB group.
*  Author: OOHOO < webdev@phpbb-tw.net >
*  Author: Stefan2k1 and ddonker from www.portedmods.com
*  Demo: http://phpbb-tw.net/
*  Version: 1.0.X - 2002/03/22 - for phpBB RC serial, and was named Related_Links_MOD
*  Version: 1.1.0 - 2002/04/25 - Re-packed for phpBB 2.0.0, and renamed to Links_MOD
*  Version: 1.2.0 - 2003/06/15 - Enhanced and Re-packed for phpBB 2.0.4
*  Version: 1.2.1 - 2003/10/15 - Enhanced by CRLin
***************************************************************************/
/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/ 

define('IN_PHPBB', true);

$phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . "common.$phpEx");


//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
	$phpver = phpversion();

	if($phpver >= "4.0.4pl1")
	{
		if(extension_loaded("zlib"))
		{
			ob_start("ob_gzhandler");
		}
	}
	else if($phpver > "4.0")
	{
		if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
		{
			if(extension_loaded("zlib"))
			{
				$do_gzip_compress = TRUE;
				ob_start();
				ob_implicit_flush(0);

				header("Content-Encoding: gzip");
			}
		}
	}
}

header ("Cache-Control: no-store, no-cache, must-revalidate");
header ("Cache-Control: pre-check=0, post-check=0, max-age=0", false);
header ("Pragma: no-cache");
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$template->set_filenames(array(
	'body' => "links_js_body.tpl"
));

//
// Grab data
//
$sql = "SELECT *
		FROM ". LINK_CONFIG_TABLE;
	if(!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, "Could not query Link config information", "", __LINE__, __FILE__, $sql);
	}
	
	while( $row = $db->sql_fetchrow($result) )
	{
		$link_config_name = $row['config_name'];
		$link_config_value = $row['config_value'];
		$link_config[$link_config_name] = $link_config_value;
		$link_self_img = $link_config['site_logo'];
		$site_logo_height = $link_config['height'];
		$site_logo_width = $link_config['width'];
		$display_interval = $link_config['display_interval'];
		$display_logo_num = $link_config['display_logo_num'];
	}

$sql = "SELECT link_id, link_title, link_logo_src
	FROM " . LINKS_TABLE . "
	WHERE link_active = 1
	ORDER BY link_hits DESC";

// If failed just ignore
if( $result = $db->sql_query($sql) )
{
	$links_logo = "";
	while($row = $db->sql_fetchrow($result))
	{
		//if (empty($row['link_logo_src'])) $row['link_logo_src'] = 'images/links/no_logo88a.gif';
		if ($row['link_logo_src']) {
			$links_logo .= ('\'<a href="' . append_sid("links.$phpEx?action=go&link_id=" . $row['link_id']) . '" target="_blank"><img src="' . $row['link_logo_src'] . '" alt="' . $row['link_title'] . '" width="' . $site_logo_width . '" height="' . $site_logo_height . '" border="0" hspace="1" /></a>\',' . "\n");
		}
	}

	if ($links_logo) {
		$links_logo = substr($links_logo, 0, -2);

		$template->assign_vars(array(
			'S_CONTENT_ENCODING' => $lang['ENCODING'],
			'T_BODY_BGCOLOR' => '#'.$theme['td_color1'],

			'DISPLAY_INTERVAL' => $display_interval,
			'DISPLAY_LOGO_NUM' => $display_logo_num,
			'LINKS_LOGO' => $links_logo
		));
	}
}

$template->pparse("body");

$db->sql_close();
//
// Compress buffered output if required
// and send to browser
//
if($do_gzip_compress)
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack("V", $gzip_crc);
	echo pack("V", $gzip_size);
}

exit;
?>

p.s. de smiles werken nu

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 20 jun 2004, 16:19

Waarom post je die code nog een keer?
Marian schreef:p.s. de smiles werken nu
Wat heb je veranderd dan?

Marian
Berichten: 79
Lid geworden op: 16 mar 2003, 16:45
Locatie: Den Helder
Contacteer:

Bericht door Marian » 20 jun 2004, 16:20

mosymuis schreef:Waarom post je die code nog een keer?
Marian schreef:p.s. de smiles werken nu
Wat heb je veranderd dan?
ik heb een andere snel reageren er op gezet.
zie die link die jij gaf. :lol:

Gesloten