Smilies in Themenüberschrift

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

Smilies in Themenüberschrift

Beitrag von Kiss News »

Hallo!
Leider kenne ich mich mit PHP nicht so gut aus, ich hoffe, jemand kann mir darauf eine Antwort geben:

Ich habe mir den Smilies in Topic titles Mod installiert, damit können Smilies in Themenüberschriftzen dargestellt werde:
http://www.kissfanshop.de/phpbb2/viewfo ... 01bcf1248d

Jetzt habe ich mir aber auch eine Statistikbox installiert (MOD Title: Mini Forum Statistik im Index), und dort werden die Smilies in den Themenüberschriften NICHT dargestellt, siehe:
http://www.kissfanshop.de/phpbb2/index.php
(ganz unten links, die letzten 5 Themen)

Frage: da der Smilies in Topic Title sehr einfach war, denke ich, kann man diesen doch bestimmt ganz einfach in das Statistikforum ebenfalls einbauen, die Frage ist nur, WIE :-?

Hier der Smilies in Topics Mod:
##############################################################
## MOD Title: Smilies in Topic Titles
## MOD Author: Suisse < chatwithbea@bluewin.ch > (Florian Segginger) http://www.techno-revelation.com
## MOD Description: Shows smilies in topic titles
## MOD Version: 1.1.1
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: viewforum.php, viewtopic.php, search.php
## Included Files: n/a
##############################################################
## Author Notes:
## If you want to disable certain smilies because they are too big or just plain ugly,
## you have to put
## $topic_title = str_replace("code for smiley","",$$topic_title);
## just before
## $topic_title = smilies_pass($topic_title);
## In viewforum.php
## You obviously have to change 'code for smiley' with the actual bbcode of the smiley
## Example:
## $topic_title = str_replace(":)","",$topic_title);
##############################################################
## MOD History:
##
## 2004-04-4 - Version 1.0.0
## - This is the first release
## 2004-04-14 - Version 1.1.1
## - I have been notified of the fact that the smilies don't show in the search and getdaily page.
## The hack is still as easy to install as before(Thank you, Juan Antonio Illescas!)
## 2004-04-15
## - I removed the unexisting page to modify (getdaily.php). I don't know where it came from.
## Apparently, search.php has changed from my version of phpbb, so I can't garantee you the
## hack will display smilies on the search page if your version is greater than 2.0.6
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

#
#-----[ AFTER, ADD ]------------------------------------
#
//Parse smilies to display topic title
$topic_title = smilies_pass($topic_title);

#
#-----[ OPEN ]------------------------------------------
#
viewforum.php

#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);

#
#-----[ AFTER, ADD ]------------------------------------
#
//Request the bbcode parsing php page, so we don't call an undefined function ;)
include($phpbb_root_path . 'includes/bbcode.' .$phpEx);

#
#-----[ FIND ]------------------------------------------
#
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];

#
#-----[ AFTER, ADD ]------------------------------------
#
//Parse smilies to show the title
//This is where you would put the code to disable certain smilies
$topic_title = smilies_pass($topic_title);

#
#-----[ OPEN ]------------------------------------------
#
search.php

#
#-----[ FIND ]------------------------------------------
#
if ( count($orig_word) )
{
$topic_title = preg_replace($orig_word, $replacement_word, $searchset[$i]['topic_title']);
}

#
#-----[ AFTER, ADD ]------------------------------------
#
//Parse smilies to show the title
//This is where you would put the code to disable certain smilies
$topic_title = smilies_pass($topic_title);


#
#-----[ FIND ]------------------------------------------
#
if ($board_config['allow_smilies'] && $searchset[$i]['enable_smilies'])
{
$message = smilies_pass($message);

#
#-----[ AFTER, ADD ]------------------------------------
#
//Parse smilies to show the title
//This is where you would put the code to disable certain smilies
$topic_title = smilies_pass($topic_title);
$post_subject = smilies_pass($post_subject);

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Kann mir jemand sagen, wie ich den in das Statistikforum einbaue?
Dateien vom Statistikorum sind:
actualstats.php
templates/actualstats_body.tpl
language/lang_english/lang_actualstats.php
language/lang_german/lang_actualstats.php

Über ne kleine Info wäre ich dankbar :D
Christian_W
Ehemaliges Teammitglied
Beiträge: 5703
Registriert: 26.02.2004 00:09

Beitrag von Christian_W »

Nimm Dir die Original "actualstats.php" dann:

Code: Alles auswählen

----- finde -----
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
----- danach einfügen -----
//Request the bbcode parsing php page, so we don't call an undefined function ;)
include($phpbb_root_path . 'includes/bbcode.' .$phpEx);

----- finde -----
    while ($row = $db->sql_fetchrow($result)) 
    { 
        $topic_id=$row['topic_id']; 
        $template->assign_block_vars("best_topics", array( 
                    'TOPIC_TITLE' => $row['topic_title'], 
                    'REPLIES' => $row['topic_replies'], 
            'VIEWTOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id")) 
            ); 
    } 
----- ersetzte mit -----
    while ($row = $db->sql_fetchrow($result)) 
    { 
        $topic_id=$row['topic_id']; 
        $topic_title=$row['topic_title'];
//Parse smilies to show the title
//This is where you would put the code to disable certain smilies
$topic_title = smilies_pass($topic_title);
        $template->assign_block_vars("best_topics", array( 
                    'TOPIC_TITLE' => $topic_title, 
                    'REPLIES' => $row['topic_replies'], 
            'VIEWTOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id")) 
            ); 
    } 

----- finde -----
                $template->assign_block_vars('topicrow', array( 
                        'ROW_COLOR' => $row_color, 
                        'ROW_CLASS' => $row_class, 
----- davor einfügen -----
//Parse smilies to show the title
//This is where you would put the code to disable certain smilies
$topic_title = smilies_pass($topic_title);
Das sollte funktionieren.

Gruß Christian

[edit]
Fehler beseitigt.
[/edit]
Zuletzt geändert von Christian_W am 14.06.2004 18:24, insgesamt 2-mal geändert.
---
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

Beitrag von Kiss News »

Hallo Christian!
danke für die Hilfe, das ergibt aber auch nen Error :(
Parse error: parse error in /mnt/ls6/15/131/00000000/htdocs/phpbb2/actualstats.php on line 483
er konnte die Seite (die Statistik) nicht auswerfen:
// Generate the page
//

$template->assign_var_from_handle('ACTUALSTATS_OUTPUT', 'actualstats_output');

?>
Zeile 483 ist die letzte Zeile mit dem Fragezeichen...
Christian_W
Ehemaliges Teammitglied
Beiträge: 5703
Registriert: 26.02.2004 00:09

Beitrag von Christian_W »

Verlinke mal bitte die Datei:
KB:datei

Gruß Christian
---
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

Beitrag von Kiss News »

Christian_W
Ehemaliges Teammitglied
Beiträge: 5703
Registriert: 26.02.2004 00:09

Beitrag von Christian_W »

Kiss News hat geschrieben:hab' ich schon wieder Mist gebaut?
Ich wollte schon schreiben ja. Aber der Fehler lag bei mir :oops: Ich habe den falschen Block zum suchen und ersetzten angegeben. Ich hab's jetzt oben korrigiert.

Gruß Christian
---
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

Beitrag von Kiss News »

Christian!
also, ich hab's nun mehrfach probiert, aber es kommt wieder der gleiche Fehler :-?
Gerhard
Christian_W
Ehemaliges Teammitglied
Beiträge: 5703
Registriert: 26.02.2004 00:09

Beitrag von Christian_W »

Es hat ganz unten im zu ersetzenden Teil eine schließende geschweifte Klammer gefehlt. Hast Du die mit drin? Ansonsten die Datei wieder verlinken.

Gruß Christian
---
Kiss News
Mitglied
Beiträge: 1640
Registriert: 31.05.2004 02:04
Wohnort: Österreich
Kontaktdaten:

Beitrag von Kiss News »

Mannomann, Du hattest Recht! Das war's! Bin mir aber absolut sicher, dass ich richtig kopiert/eingefügt hatte (3 x hab ich es gemacht, und dabei aufgepasst!). Seltsam, dass da immer wieder diese Klammer verschwindet :-?
[ externes Bild ]
Danke nochmals :D

P.S.: hast Du da vielleicht auch ne [ externes Bild ] :roll:
http://www.phpbb.de/topic57008.html
Antworten

Zurück zu „phpBB 2.0: Mod Support“