| | | |  |  | |  |
03.08.2004, 22:57
|
#1 (permalink)
| | Junior Mamber
Join Date: Apr 2004
Posts: 48
| MosSmilies 2.0 gemeinsam mit AkoComment Hallo,
damit MosSmilies 2.0 mit AkoComment funktioniert, habe ich die mossmiles.php aus dem Mambot Verzeichnis folgendermaßen verändert (alles rot geschriebene ist selbst dazu programmiert; es ist vielleicht ein wenig Umständlich programmiert, da es meine erste etwas größere php Modifikation ist): Code: # Replace the text smilies by associated pictures (from above variables...)
foreach ($botsmiley as $idx=>$botsm) {
# modification if you use ako comment
# for example $idx = :x
# $idxrot = x:
# $idxacsm = ac_smilie(':x')
# $idxacsmc = ac_smilie('x:')
# $idxacti = title=':x'
# $idxactic = title='x:'
# $idxacal = ALT=':x'
# $idxacalc = ALT='x:'
$idxrot = strrev($idx);
$idxacsm = 'ac_smilie(\'' . $idx . '\')';
$idxacsmc = 'ac_smilie(\'' . $idxrot . '\')';
$idxacti = 'title=\'' . $idx . '\'';
$idxactic = 'title=\'' . $idxrot . '\'';
$idxacal = 'ALT=\'' . $idx . '\'';
$idxacalc = 'ALT=\'' . $idxrot . '\'';
$row->text = str_replace ("$idxacsm", "$idxacsmc", $row->text);
$row->text = str_replace ("$idxacti", "$idxactic", $row->text);
$row->text = str_replace ("$idxacal", "$idxacalc", $row->text);
$row->text = str_replace ("$idx", "<IMG src='$mosConfig_live_site/mambots/mossmilies/$botsm' BORDER='0' ALT='$idx' align=\"absmiddle\">", $row->text);
$row->text = str_replace ("$idxacsmc", "$idxacsm", $row->text);
$row->text = str_replace ("$idxactic", "$idxacti", $row->text);
$row->text = str_replace ("$idxacalc", "$idxacal", $row->text);
} |
| |
03.08.2004, 23:29
|
#2 (permalink)
| | Elite Mamber
Join Date: Apr 2004
Posts: 1,283
| Re: MosSmilies 2.0 gemeinsam mit AkoComment Klasse dafür gibt es einen daumen |
| |
14.08.2004, 19:24
|
#3 (permalink)
| | Junior Mamber
Join Date: Aug 2004
Posts: 45
| Re: MosSmilies 2.0 gemeinsam mit AkoComment Hi,
The smillies also mess up email adressess, like: :P = same as: mailto:P
How can i fix that?
Thx! |
| |
28.08.2004, 12:22
|
#4 (permalink)
| | Junior Mamber
Join Date: Apr 2004
Posts: 48
| Re: MosSmilies 2.0 gemeinsam mit AkoComment Hi manolo,
thanks for the hint. This should work. I have tried it on my page.
I'm sorry that my answer is so late. Code: # Replace the text smilies by associated pictures (from above variables...)
foreach ($botsmiley as $idx=>$botsm) {
# modification if you use ako comment
# for example $idx = :x
# $idxrot = x:
# $idxacsm = ac_smilie(':x')
# $idxacsmc = ac_smilie('x:')
# $idxacti = title=':x'
# $idxactic = title='x:'
# $idxacal = ALT=':x'
# $idxacalc = ALT='x:'
# modification if you use email adress in content
# $idxcoma = mailto:x
# $idxcomac = mailtox:
$idxrot = strrev($idx);
$idxacsm = 'ac_smilie(\'' . $idx . '\')';
$idxacsmc = 'ac_smilie(\'' . $idxrot . '\')';
$idxacti = 'title=\'' . $idx . '\'';
$idxactic = 'title=\'' . $idxrot . '\'';
$idxacal = 'ALT=\'' . $idx . '\'';
$idxacalc = 'ALT=\'' . $idxrot . '\'';
$idxcoma = 'mailto' . $idx;
$idxcomac = 'mailto' . $idxrot;
$row->text = str_replace ("$idxacsm", "$idxacsmc", $row->text);
$row->text = str_replace ("$idxacti", "$idxactic", $row->text);
$row->text = str_replace ("$idxacal", "$idxacalc", $row->text);
$row->text = str_replace ("$idxcoma", "$idxcomac", $row->text);
$row->text = str_replace ("$idx", "<IMG src='$mosConfig_live_site/mambots/mossmilies/$botsm' BORDER='0' ALT='$idx' align=\"absmiddle\">", $row->text);
$row->text = str_replace ("$idxacsmc", "$idxacsm", $row->text);
$row->text = str_replace ("$idxactic", "$idxacti", $row->text);
$row->text = str_replace ("$idxacalc", "$idxacal", $row->text);
$row->text = str_replace ("$idxcomac", "$idxcoma", $row->text);
} But there is also a bug in the Akocomment component/mambot. Because when you use the BCode feature for email and you click then in the comment on the email address you will get an error.
I will have a look later on that problem. |
| |
28.08.2004, 12:46
|
#5 (permalink)
| | Junior Mamber
Join Date: Apr 2004
Posts: 48
| Re: MosSmilies 2.0 gemeinsam mit AkoComment I have also fixed the bug in akocomment use bcode for email.
edit following file:
components/com_akocomment/functions.akocomment.php
Look for following code. (all written in color red is my modification, the rest is original code) Code: # Convert smilies to images
if ($ac_smiliesupport) {
foreach ($smiley as $i=>$sm) {
# modification by Thiemo Geisberger(BCode Email click doesn't work)
# for example $i = :x
# $irot = x:
# $icoma = mailto:x
# $icomac = mailtox:
$irot = strrev($i);
$icoma = 'mailto' . $i;
$icomac = 'mailto' . $irot;
$message = str_replace ("$icoma", "$icomac", $message);
$message = str_replace ("$i", "<IMG src='$mosConfig_live_site/components/com_akocomment/images/$sm' BORDER='0' ALT='$i'>", $message);
$message = str_replace ("$icomac", "$icoma", $message);
}
}
return $message;
Last edited by thiemo; 21.09.2004 at 17:53.
|
| |
12.09.2004, 13:08
|
#6 (permalink)
| | Junior Mamber
Join Date: Aug 2004
Posts: 45
| Re: MosSmilies 2.0 gemeinsam mit AkoComment Hey thx,
But uhm, how does the whole file look now, cause with all these modifications, i cant get it to work, is it possible that you can show the whole file that works?
Very nicely done btw !!!  |
| |
12.09.2004, 13:10
|
#7 (permalink)
| | Junior Mamber
Join Date: Aug 2004
Posts: 45
| Re: MosSmilies 2.0 gemeinsam mit AkoComment Quote: |
Originally Posted by manolo Hey thx,
But uhm, how does the whole file look now, cause with all these modifications, i cant get it to work, is it possible that you can show the whole file that works?
Very nicely done btw !!!  | hmm... sorry, im very stupid, i didnt saw/read correctly i had to edit the akocomment.php file!  |
| | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT +2. The time now is 06:06. | | | |