4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Apollo13 on March 22, 2003, 09:28:27 AM
-
.
-
I think the same :D V@no rocks :!:
-
well he is a gib php progger. And thats why i think a board is no problem 4 him.
o my....!
slow down, guys! I'm not a programmer at all. The only programming language I know on 99% is Basic and Assembler on already dead 8 bit computer - ZX Spectrum (used to be most popular PC in Russia).
I found out that PHP language exist just last year, and 1 month later I found 4images, but I start learning PHP only by looking at 4images code 6 month ago...
and what I do here is just copy/past already exist code ( ofcourse not only from 4images ;) ) and just adopt it to work in the place I want it to...
but about BBCode in comments that makes 4images looks like board -> u are right... see, I just experimenting on my site, adding as much as I can, see how it looks like, so, basicaly the termin for that should be "kitch" (not sure if I spell it correctly)
So, if u want, I can post compleate package of my BBCode ;)
The Editor I "borowed" from phpBB board (yes, right, from this board ;) )
-
@V@no: PLEASE can you post complete package of your BBCode??
Thanks!
Cheers,
Markus
-
@V@no: PLEASE can you post complete package of your BBCode??
in /includes/function.php find function format_text(...){...}
replace with this:function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0, $smiles = 0) {
$text = trim($text);
if ($word_wrap && $text != "") {
$text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
}
if ($html == 0) {
$text = str_replace("<", "&lt;", $text);
$text = str_replace(">", "&gt;", $text);
$text = str_replace("<", "<", $text);
$text = str_replace(">", ">", $text);
}
$text = str_replace("\n", "<br />", $text);
$text = replace_url($text);
if ($bbcode == 1) {
/* $search_array = array(
"/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
"/(\[)(list)(])(.*)(\[\/list\])/siU",
"/(\[\*\])/siU",
"/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
"/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
"/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU",
"/(\[)(url)(])([^\"]*)(\[\/url\])/siU",
"/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU",
"/javascript:/si",
"/about:/si"
);
$replace_array = array(
"<ol type=\"\\5\">\\7</ol>",
"<ul>\\4</ul>",
"<li>",
"<a href=\"http://www.\\6\" target=\"_blank\">\\8</a>",
"<a href=\"\\5\" target=\"_blank\">\\7</a>",
"<a href=\"http://www.\\5\" target=\"_blank\">www.\\5</a>",
"<a href=\"\\4\" target=\"_blank\">\\4</a>",
"<pre>Code:<hr size=1>\\5<hr size=1></pre>",
"java script:",
"about :"
);
*/
$search_array = array(
"/\[b\](.*?)\[\/b\]/si",
"/\[i\](.*?)\[\/i\]/si",
"/\[u\](.*?)\[\/u\]/si",
"/\[email\](.*?)\[\/email\]/si",
"/\[email=(.*?)\](.*?)\[\/email\]/si",
"/\[code\](.*?)\[\/code\]/si",
"/\[quote\](.*?)/si",
"/\[\/quote\]/si",
"/\[url=(.*?)\](.*?)\[\/url\]/si",
"/\[url\](.*?)\[\/url\]/si",
"/\[sub\](.*?)\[\/sub\]/si",
"/\[sup\](.*?)\[\/sup\]/si",
"/\[color=(.*?)\](.*?)\[\/color\]/si",
"/\[size=(.*?)\](.*?)\[\/size\]/si",
"/\[tt\](.*?)\[\/tt\]/si",
"/\[s\](.*?)\[\/s\]/si",
"/\[move\](.*?)\[\/move\]/si",
// "/\[align=(.*?)\](.*?)\[\/align\]/si",
"/\[align=(.*?)\](.*?)\[\/align\](.<br \/>)?/si",
"/\[font=(.*?)\](.*?)\[\/font\]/si",
"/\[shadow=(.*?)\,(.*?)\,(.*?)\](.*?)\[\/shadow\]/si",
"/\[glow=(.*?)\,(.*?)\,(.*?)\](.*?)\[\/glow\]/si",
"/\[quote=(.*?)\](.*?)/si",
"/\[\/quote\]/si"
);
$replace_array = array(
"<b>\\1</b>",
"<i>\\1</i>",
"<u>\\1</u>",
"<a href=mailto:\\1>\\1</a>",
"<a href=mailto:\\1>\\2</a>",
"<blockquote><span class=\"12px\">code:</span><hr><pre>\\1</pre><hr></blockquote>",
"<blockquote><span class=\"12px\">quote:</span><hr>\\1",
"<hr></blockquote>",
"<a href=\"\\1\" target=_blank>\\2</a>",
"<a href=\\1 target=_blank>\\1</a>",
"<sub>\\1</sub>",
"<sup>\\1</sup>",
"<font color=\"\\1\">\\2</font>",
"<font style=\"font-size: \\1px\">\\2</font>",
"<tt>\\1</tt>",
"<s>\\1</s>",
"<marquee>\\1</marquee>",
"<div align=\"\\1\">\\2</div>",
"<font face=\"\\1\">\\2</font>",
"<font style=\"Filter: Shadow(color=\\1, Direction=\\2); Width=\\3px;\">\\4</font>",
"<font style=\"Filter: Glow(color=\\1, Strength=\\2); Width=\\3px;\">\\4</font>",
"<blockquote><span class=\"12px\"><b>\\1</b> wrote:</span><hr>\\2",
"<hr></blockquote>"
);
/* $text = preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\"\\1\" border=\"0\">", $text);
$text = preg_replace("/\[img=(.*?)\,(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\2\" width=\"\\1\">",$text);
$text = preg_replace("/\[img height=(.*?)\ width=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\1\" width=\"\\2\">",$text);
$text = preg_replace("/\[img width=(.*?)\ height=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" width=\"\\1\" height=\"\\2\">",$text);
$text = preg_replace("/\[flash=(.*?)\,(.*?)\](.*?)\[\/flash\]/si","<object classid=\"clsid: D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\\1 height=\\2><param name=movie value=\\3><param name=play value=true><param name=loop value=true><param name=quality value=high><embed src=\\3 width=\\1 height=\\2 play=true loop=true quality=high></embed></object>",$text);
*/
$text = preg_replace($search_array, $replace_array, $text);
if (!$bbcode_img) {
// $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>", $text);
$text = preg_replace("/\[img\](.*?)\[\/img\]/si", "<a href=\"\\1\" target=\"_blank\">\\1</a>", $text);
$text = preg_replace("/\[img=(.*?)\,(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
$text = preg_replace("/\[img height=(.*?)\ width=(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
$text = preg_replace("/\[img width=(.*?)\ height=(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
$text = preg_replace("/\[flash=(.*?)\,(.*?)\](.*?)\[\/flash\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
}else{
// $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<img src=\"\\5\">", $text);
$text = preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\"\\1\" border=\"0\">", $text);
$text = preg_replace("/\[img=(.*?)\,(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\2\" width=\"\\1\">",$text);
$text = preg_replace("/\[img height=(.*?)\ width=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\1\" width=\"\\2\">",$text);
$text = preg_replace("/\[img width=(.*?)\ height=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" width=\"\\1\" height=\"\\2\">",$text);
$text = preg_replace("/\[flash=(.*?)\,(.*?)\](.*?)\[\/flash\]/si","<object classid=\"clsid: D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\\1 height=\\2><param name=movie value=\\3><param name=play value=true><param name=loop value=true><param name=quality value=high><embed src=\\3 width=\\1 height=\\2 play=true loop=true quality=high></embed></object>",$text);
}
}
$text = str_replace("[hr]", "<hr>", $text);
$text = smilies($text);
$text = str_replace("\\'", "'", $text);
return replace_badwords($text);
}
if u want also the editor, download this (http://home.attbi.com/~vanowm/comment_form.zip) package, put .js file in 4images root folder, and .html into themplates folder (backup the old template first).
(I hope I didnt change anything else in .php files....dont remmember :? )
P.S. since the editor is actualy phpBB editor, it has same bug as on this forum:
1. type some text
2. select part of it
3. delete that selected text
4. press any BBCode button
5. press any smile
after that it will erase entire text u typed... 8O
I have reported this but to phpBB bugs, they fixed it...but where and how to get the fix???? :?
http://www.phpbb.com/bugs/bug.php?op=show&bugid=1550
-
I get a blank page. replacing the above :?
-
Thanks v@no. Everything works fine, but I cannot see any smiles, so that I cannot say anything about the bug.
How can I add the smiles like on your website?
Thanks again.
Markus
-
I have the same problem, I can´t see any smiles. :oops:
http://www.4homepages.de/forum/viewtopic.php?t=4133
I use your emoticons Mod and works well but i can´t see smiles in bbcode.
-
I have the same problem, I can´t see any smiles. :oops:
http://www.4homepages.de/forum/viewtopic.php?t=4133
I use your emoticons Mod and works well but i can´t see smiles in bbcode.
ah, I guess I edded another function ;)
ok, right after the smiles code from the link above, add this function:function get_smiles_text() {
$smilesfrom = get_smiles();
$val_old = "";
$i = 0;
foreach ($smilesfrom as $key => $val) {
if ($val_old != $val) {
$smiles_text .= "<a href=\"javascript:emoticon('$key')\"><img src=\"".TEMPLATE_PATH."/smiles/$val.gif\" alt=\"$key\" border=\"0\"></a> ";
}
$val_old = $val;
$i++;
if ($i > 18) {
$smiles_text .= "<a href=\"smiles.php\" onclick=\"window.open('smiles.php', '_4imagessmilies', 'HEIGHT=110,resizable=yes,scrollbars=yes,WIDTH=180');return false;\" target=\"_4imagessmilies\"> All Emoticons</a>";
return $smiles_text;
}
}
return $smiles_text;
}
also, redownload the package, I included smiles.php that needed for popup when u click on "all smiles", just put along with .js file in 4images root folder.
P.S.
but I cannot see any smiles, so that I cannot say anything about the bug.
u dont have to install anything, to feel the bug, just do those steps right here, on this forum, Unless its specific for system configuration I have (WindowsXp + IE6)
-
I have a problem i can´t show the emoticons. :(
My functions.php
http://xwall.metropoliglobal.com/xxx/xxx/functions.phps
-
I have a problem i can´t show the emoticons. :(
My functions.php
wait i put the adress[/code]
ah, ok...I think I edited more files then I though... 8O
find in detail.php "lang_bbcode" => $lang['bbcode'],
add after: "smiles_text" => get_smiles_text(),
-
upps
Fatal error: Call to undefined function: get_smiles() in /home/xxx/htdocs/xxx/xxx/functions.php on line 1340
-
Now I get following error: 8O
Fatal error: Call to undefined function: get_smiles() in /raid/domains/de/r/XXXXX/htdocs/XXXX/includes/functions.php on line 1270
Can anybody help??
Thanks!
Markus
-
gee.....I'm the trouble maker...am I?.. (I see u still having problem)
ok, here is compleate smiles code I have://--------------------------
//--------Smiles------------
//--------------------------
function smilies($text,$enablesmilies = 1) {
global $smileyfromcache, $smileytocache;
$imagesdir = TEMPLATE_PATH."/smiles";
if(gettype($smileyfromcache) != "array") {
$smilesfrom = get_smiles();
foreach ($smilesfrom as $key => $val) {
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
$smileytocache[] = "\\1<img src=\"$imagesdir/$val.gif\" alt=\"\" border=\"0\">";
}
}
if ($enablesmilies) {
$text = parsesmilies($text);
}
return $text;
}
function parsesmilies($text) {
global $smileyfromcache, $smileytocache;
$oldtext = "";
while($oldtext != $text) {
$oldtext = $text;
$text = preg_replace($smileyfromcache, $smileytocache, $text);
}
return $text;
}
function get_smiles(){
/* $smilesfrom = array(
":)" => "smiley",
":angry:" => "angry",
";)" => "wink",
":D" => "cheesy",
";D" => "grin",
":(" => "sad",
":o" => "shocked",
":O" => "shocked",
"8)" => "cool",
":P" => "tongue",
":p" => "tongue",
"???" => "huh",
":-[" => "embarassed",
":-X" => "lipsrsealed",
":-x" => "lipsrsealed",
":-'(" => "cry",
":-\\" => "undecided",
"::)" => "rolleyes",
":kiss:" => "kiss",
":laugh:" => "laugh"
);*/
$smilesfrom = array(
":D" => "icon_biggrin",
":)" => "icon_smile",
":(" => "icon_sad",
":oops:" => "icon_redface",
":o" => "icon_surprised",
"8O" => "icon_eek",
":?" => "icon_confused",
"8)" => "icon_cool",
":lol:" => "icon_lol",
":x" => "icon_mad",
":P" => "icon_razz",
":p" => "icon_razz",
":cry:" => "icon_cry",
":evil:" => "icon_evil",
":twisted:" => "icon_twisted",
":roll:" => "icon_rolleyes",
":wink:" => "icon_wink",
"(?)" => "icon_question",
":idea:" => "icon_idea",
":arrow:" => "icon_arrow",
":neutral:" => "icon_neutral",
":mrgreen:" => "icon_mrgreen"
);
return $smilesfrom;
}
function get_smiles_text() {
$smilesfrom = get_smiles();
$val_old = "";
$i = 0;
foreach ($smilesfrom as $key => $val) {
if ($val_old != $val) {
$smiles_text .= "<a href=\"javascript:emoticon('$key')\"><img src=\"".TEMPLATE_PATH."/smiles/$val.gif\" alt=\"$key\" border=\"0\"></a> ";
}
$val_old = $val;
$i++;
if ($i > 18) {
$smiles_text .= "<a href=\"smiles.php\" onclick=\"window.open('smiles.php', '_4imagessmilies', 'HEIGHT=110,resizable=yes,scrollbars=yes,WIDTH=180');return false;\" target=\"_4imagessmilies\"> All Emoticons</a>";
return $smiles_text;
}
}
return $smiles_text;
}
//------End Smiles-------
-
@V@no: PLEASE can you post complete package of your BBCode??
in /includes/function.php find function format_text(...){...}
..
if u want also the editor, download this (http://home.attbi.com/~vanowm/comment_form.zip) package, put .js file in 4images root folder, and .html into themplates folder (backup the old template first).
(I hope I didnt change anything else in .php files....dont remmember :? )
P.S. since the editor is actualy phpBB editor, it has same bug as on this forum:
1. type some text
2. select part of it
3. delete that selected text
4. press any BBCode button
5. press any smile
after that it will erase entire text u typed... 8O
I have reported this but to phpBB bugs, they fixed it...but where and how to get the fix???? :?
http://www.phpbb.com/bugs/bug.php?op=show&bugid=1550
My pages go blank when I do this. Really strange...
-
My pages go blank when I do this. Really strange...
no, nothing strange...I didnt post all the code ;)
follow the replays.
-
My pages go blank when I do this. Really strange...
no, nothing strange...I didnt post all the code ;)
follow the replays.
I did! I replaced: function format_text (after that, when I go to my site, everything is blank. Uploaded the package. Put the file's in the right place. Pun in the smillies code in functions.php. Changed details.php. It still gives me a complete white page.
-
ok, sorry guys, dont have time right now.
If u replaced my original smiles code with the code above, it should work, unless u can tell me what is the error message.
I'll be back in 10 hours, be patient ;)
-
yes, thank you very much :wink:
-
yes, thank you very much :wink:
atleast one got it to work ;)
-
@v@no: GREAT JOB! Everything works fine!
Thank U very much!
Cheers,
MArkus
-
@PuCK: Try to delete your temp internet files.
-
@PuCK: Try to delete your temp internet files.
I got it working! A bit of a stupid mistake, I didn't do the smillie mod :oops: But I just did en after that this one worked.
-
i add the parts of your code what i need and it work fine. But one last question 2 this: on every Comment on your site there is a link called Quote. What do I have 2 edit the thelink is shown there?
the problem is that I didnt track of how I did it...so, I'm not sure for sure witch files I edited without detailed look in the code :?
anyway, lets hope, thats details.php is the only file I edited...
in /details.php find: "admin_links" => $admin_links
Replace with: "admin_links" => $admin_links,
"comment_quote" => "<a href=\"".$site_sess->url($self_url.""e=".$comment_row[$i]['comment_id'])."#commentform\">[Quote]</a> "
then, find: if (!$allow_posting) {
$comment_form = "";
}
else {
$user_name = (isset($HTTP_POST_VARS['user_name']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['user_name']))) : (($user_info['user_level'] != GUEST) ? htmlspecialchars($user_info['user_name']) : "");
$comment_headline = (isset($HTTP_POST_VARS['comment_headline']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']))) : "";
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_text']))) : "";
$site_template->register_vars(array(
"bbcode" => $bbcode,
"user_name" => $user_name,
"comment_headline" => $comment_headline,
"comment_text" => $comment_text,
"lang_post_comment" => $lang['post_comment'],
"lang_name" => $lang['name'],
"lang_headline" => $lang['headline'],
"lang_comment" => $lang['comment']
));
$comment_form = $site_template->parse_template("comment_form");
}
$site_template->register_vars("comment_form", $comment_form);
unset($comment_form);
} // end if allow_comments
Replace with: if (!$allow_posting) {
$comment_form = "";
}
else {
$comment_quote_id = (isset($HTTP_GET_VARS['quote'])) ? $HTTP_GET_VARS['quote'] : $HTTP_POST_VARS['quote'];
if (intval($comment_quote_id)) {
$sql = "SELECT c.comment_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text
FROM ".COMMENTS_TABLE." c
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
WHERE c.comment_id = $comment_quote_id";
$result = $site_db->query_firstrow($sql);
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? stripslashes(trim($HTTP_POST_VARS['comment_text'])) : "";
$comment_headline = (isset($HTTP_POST_VARS['comment_headline']) && $error) ? stripslashes(trim($HTTP_POST_VARS['comment_headline'])) : "";
if ($result['comment_text']) {
$comment_text .= "[quote=".$result['comment_user_name']."]".$result['comment_text']."[/quote]";
}
if ($result['comment_headline']) {
$comment_headline .= "RE: ".$result['comment_headline'];
}
}
$user_name = (isset($HTTP_POST_VARS['user_name']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['user_name']))) : (($user_info['user_level'] != GUEST) ? htmlspecialchars($user_info['user_name']) : "");
// $comment_headline = (isset($HTTP_POST_VARS['comment_headline']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']))) : "";
$site_template->register_vars(array(
"bbcode" => $bbcode,
"user_name" => $user_name,
"comment_headline" => $comment_headline,
"comment_text" => $comment_text,
"lang_post_comment" => $lang['post_comment'],
"lang_name" => $lang['name'],
"lang_headline" => $lang['headline'],
"lang_comment" => $lang['comment']
));
$comment_form = $site_template->parse_template("comment_form");
}
$site_template->register_vars("comment_form", $comment_form);
unset($comment_form);
} // end if allow_comments
then, add in /templates/<yourtemplate>/comment_bit.html this:
{comment_quote}
-
I had some errors.
Fatal error: Call to undefined function: get_smiles_text() in /ha/jackie/public_html/barndisco.com/album/details.php on line 438
Jackie
jackie911@so-net.com.hk
I have a problem i can´t show the emoticons. :(
My functions.php
wait i put the adress[/code]
ah, ok...I think I edited more files then I though... 8O
find in detail.php "lang_bbcode" => $lang['bbcode'],
add after: "smiles_text" => get_smiles_text(),
-
I had some errors.
did u follow the replys?
-
I have a problem i can´t show the emoticons. :(
My functions.php
wait i put the adress[/code]
ah, ok...I think I edited more files then I though... 8O
find in detail.php "lang_bbcode" => $lang['bbcode'],
add after: "smiles_text" => get_smiles_text(),
Hy V@no,
i use your Mod too, it is very great. Thank´s for it.
In phpbb are 2 funktions more "prevew" comment and in my version the fully moded version of phpbb is a buddy funktion too.
My question to you: :oops:
Is there an chance to include that 2 funktions too ??? I think it whould by very great to use that too.
Gabi
-
i use your Mod too, it is very great. Thank´s for it.
In phpbb are 2 funktions more "prevew" comment and in my version the fully moded version of phpbb is a buddy funktion too.
My question to you: :oops:
Is there an chance to include that 2 funktions too ??? I think it whould by very great to use that too.
I'm sorry, I dont "do" board integrations, I dont have an answer for this.
-
i use your Mod too, it is very great. Thank´s for it.
In phpbb are 2 funktions more "prevew" comment and in my version the fully moded version of phpbb is a buddy funktion too.
My question to you: :oops:
Is there an chance to include that 2 funktions too ??? I think it whould by very great to use that too.
I'm sorry, I dont "do" board integrations, I dont have an answer for this.
Hy V@no,
the integration of phpbb is not twhat i mean :D that works without problem on my page.
I mean bb code in 4 images.(for coment) I want to use there "prefew" and "buddy funktion"
lg
GABI
-
was meinst du denn
ah no english... or are u speaking german as well? Well what do u mean with buddy function?
lol stimmt mein englisch ist ne Katastrofe... :oops:
Als was ich meinte ist ich habe in meine 4images Gallerie den geänderten bb code eingebaut der hier beschrieben ist. Funtz auch super....
Hier im Forum z.b. giebt es doch noch die "Vorschaufunktion" wenn ich einen Kommentar schreibe....das ist das eine was ich gere einfügen würed.
Das andere ist innerhalb des Forums habe ich noch die Möglichkeit jeden der einen Kommentar geschrieben hat als "Buddy" zu makieren.....Ist n bissel schwierig zu erklären...
Schaue dir einfach mal mein Forum an http://www.foto-place.de denn ich verwende auch keine Standartversion von phpbb. (müsstest dich halt registrieren)
lg
Gabi
-
Runtime Error
pms.php
REMOVED!!!!!!!!!!!!
:idea:
Jackie
-
ok, jackie911, I've aked u three times already:
1. Describe your problem, or u'll be ignored (by me atleast). :evil:
2. Dont post entire posts as quote! Just quote the part u have question with - that makes easier to understand what are u talking about, and post stays small, neat and easy to read.
3. If u have a question regarding a MOD, reply to THAT MOD, not anywhere alse, dont start new topic either.
Yes, I understand that many people having hard time wrinting in english or german here, but still, I'd reather think of what did he mean by that sentese, then think of post like this:please help
http://mysite.com
thx!
P.S. I did removed entire pms.php code from your post :x
-
I mean bb code in 4 images.(for coment) I want to use there "prefew" and "buddy funktion"
the PHBB bbcode I've posted already.
The preview feature I think is useless, and too much work for that ;)
but, there is a way around, u can let comment owner edit their comments.
If u look in my "Members Personal Category" MOD, then u'll see in first 4-6 steps code with commented lines. u can use those commented line in you member.php that will do the trick.
"buddy function" - not sure what is that.
-
I know it, but I'm not an expert in PHP.
I need help to debug my PHP script.
Can you tell me "How can I do it"??
Jackie
-
I need help to debug my PHP script.
ok.
Can you tell me "How can I do it"??
no, because u refuse tell us what/where is the problem. :roll:
(hey, I'm not picking on u ;))
-
I'm not sure the problems to my site. But I just to know my problems "If I use the PMS to send a new message with smile text or bbcode, the error was found.
Could you tell me "How can I check it? & Where can I found the solution?".
:arrow: http://www.barndisco.com/alnum/
Thanks.
Jackie
jackie911@so-net.com.hk
P.S. Sorry, I'm not an expert in PHP script. If I want to debug the PHP script, What software do I need to install in my computer?
-
I'm not sure the problems to my site. But I just to know my problems "If I use the PMS to send a new message with smile text or bbcode, the error was found.
Ah, see, my NortonInternetSecurity kills all JS errors, so it doesnt show me any errors...
but u forgot add<script language="JavaScript" src="bbcode.js" type="text/javascript"></script>
in your template.
-
Thank you very much.
:lol:
And you use the NortonInternetSecurity, this software can check all error in PHP and JS.
Ah, see, my NortonInternetSecurity kills all JS errors, so it doesnt show me any errors...
but u forgot add<script language="JavaScript" src="bbcode.js" type="text/javascript"></script>
in your template.
-
pms_new.html
-
pms_new.html
Thank you for your kindly help.
P.S. I'm sorry for an inconvenience cause.
Jackie
:lol:
-
Ein wenig spät, aber für alle Deutschprachigen
Das BBcode Javafile in Deutsch (selbst übersetzt :wink: )
http://www.datenplatz.ch/leeger/gallery/downloads/bbcode_german.rar
Viel spass!
-
my smiles.php is so messy...
http://www.ratechinese.com/smiles.php
How to make it so it will look like this:
http://www.gamenetasia.com/forum/misc.php?action=getsmilies&s=
Thanks in advance!
-
V@no can you post the new bbcode that u use
because I like to show more smilies in the bbcode
and if is it possible to public you rating mod it will be great
thanks for your help :D
-
... I like to show more smilies in the bbcode ...
Add your own smiles to your bbcode ! It is easy ! My example for two Smiles more ...
1. add the Smiles-images "question.gif" ( like this - :?: ) and "exclaim.gif" ( like this - :!: ) in folder /templates/<your_template>/smiles
2. Find in includes/functions.php the following code :
);
return $smilesfrom;
and add above the two Smiles as follows :
,
":?:" => "question",
":!:" => "exclaim",
Important: Add a comma after the first last Smiley ... !
... thats all ... now create your own smiles ... with this example you can add smiles without end ... :mrgreen:
mawenzi
-
@Mawenzi :
":!:" => "exclaim",
should be :
":!:" => "exclaim"
since you're suggesting to add additional arrays "above" the "return" command and, for your case, the : "exclaim" word is on the last line before the array closes. ;)
Otherwise, by leaving the comma there, it will return an error message from the header.
-
Otherwise, by leaving the comma there, it will return an error message from the header.
Where do you get this information? There is no error, not even notice message will be displayed if you leave a comma on last element in the array. It does not required, but there is no punishment for leaving it there either.
-
@ TheOracle,
... actually you are right ... but ... I think the comma stand already for the next smiles ... :mrgreen:
... and on the other hand I can confirm V@nos statement ... there is no error message !
-
actually you are right ... but ... I think the comma stand already for the next smiles
I see. From your example, it wasn't quite obvious. :mrgreen:
-
thanks!!!!!
but I saw in V@no site that in the bbcode form he had 14 or more smilies displaying, and I have only 9
or v@no can you post you latest function for smilies and bbcode?
thanks again!
-
@live@ct
... did you read my answer ... :?: :roll:
-
yeah thanks, but i was edited the wrong template :?
im having an error in the javascript of the IE
that IE expext a ")"
but the smilies and bbcode works fine
-
Is it possible to use this mod and how can I implement it into http://www.4homepages.de/forum/index.php?topic=6824.0 ?
-
I get this error when I change all the smiles for the new yahoo emoticons:
Warning: preg_replace(): Unknown modifier ')' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716
Warning: preg_replace(): Unknown modifier ':' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716
Warning: preg_replace(): Unknown modifier ')' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716
Warning: preg_replace(): Unknown modifier ')' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716
this the code for the smiles
from the line 1693 to 1833
//--------------------------
//--------Smiles------------
//--------------------------
function smilies($text,$enablesmilies = 1) {
global $smileyfromcache, $smileytocache;
$imagesdir = TEMPLATE_PATH."/smiles";
if(gettype($smileyfromcache) != "array") {
$smilesfrom = get_smiles();
foreach ($smilesfrom as $key => $val) {
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
$smileytocache[] = "\\1<img src=\"$imagesdir/$val.gif\" alt=\"\" border=\"0\">";
}
}
if ($enablesmilies) {
$text = parsesmilies($text);
}
return $text;
}
function parsesmilies($text) {
global $smileyfromcache, $smileytocache;
$oldtext = "";
while($oldtext != $text) {
$oldtext = $text;
$text = preg_replace($smileyfromcache, $smileytocache, $text);
}
return $text;
}
function get_smiles(){
$smilesfrom = array(
":)" => "happy",
":(" => "sad",
";)" => "winking",
":D" => "big_grin",
";;)" => "batting_eyelashes",
">:D<" => "big_hug",
":-/" => "confused",
":x" => "love_struck",
":>" => "blushing",
":P" => "tongue",
":-*" => "kiss",
"=((" => "broken_heart",
":-O" => "surprise",
"X(" => "angry",
":>" => "smug",
"B-)" => "cool",
":-S" => "worried",
"w:-S" => "whew",
">:)" => "devil",
":((" => "crying",
":))" => "laughing",
":|" => "straight_face",
"/:)" => "raised_eyebrow",
"=))" => "rolling_on_the_floor",
"O:)" => "angel",
":-B" => "nerd",
"=;" => "talk_to_the_hand",
":-c" => "call_me",
":)]" => "on_the_phone",
"~X(" => "at_wits_end",
":-h" => "wave",
":-t" => "time_out",
"8->" => "daydreaming",
"I-|" => "sleepy",
"8-|" => "rolling_eyes",
"L-)" => "loser",
":-&" => "sick",
":-$" => "dont_tell_anyone",
"[-(" => "not_talking",
":O)" => "clown",
"8-}" => "silly",
"<:-P" => "party",
"(:|" => "yawn",
"=P~" => "drooling",
":-?" => "thinking",
"d-o" => "doh",
"=D>" => "applause",
":-SS" => "nailbiting",
"h-)" => "hypnotized",
":^o" => "liar",
":-w" => "waiting",
":-<" => "sigh",
">:P" => "phbbbbt",
"<):)" => "cowboy",
":-??" => "i_dont_know",
"%-(" => "not_listening",
":@)" => "pig",
"3:-O" => "cow",
":(|)" => "monkey",
"~:>" => "chicken",
"@};-" => "rose",
"%%-" => "good_luck",
"(~~)" => "pumpkin",
"~O)" => "coffee",
"*-:)" => "idea",
"8-X" => "skull",
"=:)" => "bug",
">-)" => "alien",
":-L" => "frustrated",
"[-O<" => "praying",
"$-)" => "money_eyes",
":-w" => "whistling",
"b-(" => "feeling_beat_up",
":)>-" => "peace_sign",
"[-X" => "shame_on_you",
"\:D/" => "dancing",
">:/" => "bring_it_on",
";))" => "hee_hee",
":-@" => "chatterbox",
"^:)^" => "not_worthy",
":-j" => "oh_go_on",
"(*)" => "star",
"o->" => "hiro",
"o=>" => "billy",
"o-+" => "april",
"(%)" => "yin_yang",
);
return $smilesfrom;
}
function get_smiles_text() {
$smilesfrom = get_smiles();
$val_old = "";
$i = 0;
$val_old = array();
foreach ($smilesfrom as $key => $val) {
if (!in_array($val, $val_old)) {
$smiles_text .= "<a href=\"javascript:emoticon('$key')\"><img src=\"".TEMPLATE_PATH."/smiles/$val.gif\" alt=\"$key\" border=\"0\"></a> ";
}
$val_old[] = $val;
$i++;
if ($i > 18) {
$smiles_text .= "<a href=\"smiles.php\" onclick=\"window.open('smiles.php', '_4imagessmilies', ',',',',','HEIGHT=310,resizable=yes,scrollbars=yes,WIDTH=225');return false;\" target=\"_4imagessmilies\"> All Emoticons</a>";
return $smiles_text;
}
}
return $smiles_text;
}
//------End Smiles-------
-
The Zip file from first post is missing.
Somone have its copy ?
-
I have a short question for V@no.
So Instead of starting a new post, I am asking it here.
V@no, would u like to share how r u showing this??
http://img386.imageshack.us/img386/6544/image11wd.jpg
I mean two previous & next images and in center "11 out of 17"
Is it something available in the forum? I tried but can’t find it.
-
why some smiles didnt show this is my code
function smilies($text,$enablesmilies = 1) {
global $smileyfromcache, $smileytocache;
$imagesdir = TEMPLATE_PATH."/smiles";
if(gettype($smileyfromcache) != "array") {
$smilesfrom = get_smiles();
foreach ($smilesfrom as $key => $val) {
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
$smileytocache[] = "\\1<img src=\"$imagesdir/$val.gif\" alt=\"\" border=\"0\">";
}
}
if ($enablesmilies) {
$text = parsesmilies($text);
}
return $text;
}
function parsesmilies($text) {
global $smileyfromcache, $smileytocache;
$oldtext = "";
while($oldtext != $text) {
$oldtext = $text;
$text = preg_replace($smileyfromcache, $smileytocache, $text);
}
return $text;
}
function get_smiles(){
$smilesfrom = array(
":)" => "happy",
"(:" => "happy",
":-))" => "laughing",
":lol:" => "laughing",
":D" => "big_grin",
":O" => "surprise",
":o" => "surprise",
";)" => "winking",
":wink:" => "winking",
":(" => "sad",
":*(" => "crying",
":cry:" => "crying",
":confused:" => "confused",
":shy:" => "blushing",
":vicious:" => "smug",
":|" => "straight_face",
":pig:" => "pig",
":P" => "tongue",
":p" => "tongue",
"B)" => "cool",
":B" => "nerd",
"X(" => "angry",
":X" => "love_struck",
"|)" => "sleepy",
"=;" => "talk_to_the_hand",
"@};-" => "rose",
"):)" => "cowboy",
"8X" => "skull",
"=:)" => "alien",
"0:)" => "angel",
":devil:" => "devil",
":clown:" => "clown",
"3:O" => "cow",
"3:o" => "cow",
":monkey:" => "monkey",
"(~~)" => "pumpkin",
"[-(" => "not_talking",
"*:)" => "idea",
":$" => "dont_tell_anyone",
":chicken:" => "chicken",
"~o)" => "coffee",
"%%-" => "good_luck",
"b(" => "feeling_beat_up",
":E:" => "peace_sign",
":&" => "sick",
"=*" => "kiss",
";;)" => "batting_eyelashes",
":?)" => "raised_eyebrow",
"(%)" => "yin_yang",
"o-+" => "april",
":billy:" => "billy",
":hiro:" => "hiro",
":mad:" => "frustrated",
":R:" => "praying",
"[-x" => "shame_on_you",
"[:D]" => "big_hug",
":dance:" => "dancing",
"=D" => "applause",
"(?)" => "thinking",
":^o" => "liar",
"@)" => "hypnotized",
"8|" => "rolling_eyes",
"8}" => "silly",
"?|" => "yawn",
"=p~" => "drooling",
"$)" => "money_eyes",
":whistle:" => "whistling",
"#o" => "doh",
":alien:" => "bug",
":S" => "worried",
"~X(" => "at_wits_end",
"o=>" => "billy",
">:b" => "bring_it_on",
"=((" => "broken_heart",
":-c" => "call_me",
":-@" => "chatterbox",
"8->" => "daydreaming",
";))" => "hee_hee",
":-??" => "i_dont_know",
"L-)" => "loser",
":-SS" => "nailbiting",
"%-(" => "not_listening",
"^:)^" => "not_worthy",
":-j" => "oh_go_on",
":)]" => "on_the_phone",
"<:-p" => "party",
">:-p" => "phbbbbt",
"=))" => "rolling_on_the_floor",
":-<" => "sigh",
"(*)" => "star",
":-t" => "time_out",
":-w" => "waiting",
":-h" => "wave",
"w:-S" => "whew",
);
return $smilesfrom;
}
function get_smiles_text() {
$smilesfrom = get_smiles();
$val_old = "";
$i = 0;
$val_old = array();
foreach ($smilesfrom as $key => $val) {
if (!in_array($val, $val_old)) {
$smiles_text .= "<a href=\"javascript:emoticon('$key')\"><img src=\"".TEMPLATE_PATH."/smiles/$val.gif\" alt=\"$key\" border=\"0\"></a> ";
}
$val_old[] = $val;
$i++;
if ($i > 100) {
$smiles_text .= "<a href=\"smiles.php\" onclick=\"window.open('smiles.php', '_4imagessmilies', ',',',',','HEIGHT=310,resizable=yes,scrollbars=yes,WIDTH=225');return false;\" target=\"_4imagessmilies\"> Mostrar Todas</a>";
return $smiles_text;
}
}
return $smiles_text;
}
//------End Smiles-------
the smilies like <:-p dindt show, it show like text and didnt show the image
thanks for your help