DragonPrime - LoGD Resource Community

Modules, Themes and other customizations for your game => v0.9.7 Modification Discussions => Topic started by: Eliwood on May 28, 2005, 09:31:03 AM



Title: Chat-Emote /X: "/X The Sun is shinning" -> "The Sun is shining"
Post by: Eliwood on May 28, 2005, 09:31:03 AM
With this Mod, Users can write "/X The Sun is shinning"and the commentary is going to be "The Sun is shining"

Open common.php and scroll to the addcommentary-function, search:
Code:
if (substr($commentary,0,1)!=":" &&
substr($commentary,0,2)!="::" &&
substr($commentary,0,3)!="/me" &&
$session['user']['drunkenness']>0) {
//drunk people shouldn't talk very straight.
Replace with
Code:
if (substr($commentary,0,1)!=":" &&
substr($commentary,0,2)!="::" &&
substr($commentary,0,3)!="/me" &&
substr($commentary,0,2)!="/X" &&
$session['user']['drunkenness']>0) {
//drunk people shouldn't talk very straight.

Search
Code:
if ($talkline!="sagt" // do an emote if the area has a custom talkline and the user isn't trying to emote already.
&& substr($commentary,0,1)!=":"
&& substr($commentary,0,2)!="::"
&& substr($commentary,0,3)!="/me")

Replace with:
Code:
if ($talkline!="sagt" // do an emote if the area has a custom talkline and the user isn't trying to emote already.
&& substr($commentary,0,1)!=":"
&& substr($commentary,0,2)!="::"
&& substr($commentary,0,2)!="/X"
&& substr($commentary,0,3)!="/me")

Scroll to the function viewcommentary and Search:
Code:
if (substr($ft,0,2)=="::") $ft = substr($ft,0,2);
    else

Add:
Code:
if (substr($ft,0,2)=="/X") $ft = substr($ft,0,2);
   else
Search
Code:
if ($ft=="::" || $ft=="/me" || $ft==":")
   {
      $x = strpos($row[comment],$ft);
      if ($x!==false)
         {
            if ($linkbios)
               $op[$i] = str_replace("&","&",HTMLEntities(substr($row[comment],0,$x)))
               ."`0<a href='$link' style='text-decoration: none'>\n`&$row[name]`0</a>\n`& "
               .str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
               ."`0`n";
            else
               $op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
               ."`0\n`&$row[name]`0\n`& "
               .str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
               ."`0`n";
         }
   }

Add befor:
Code:
      /*
      Landschafts-Emote by Eliwood
      */
            if ($ft=="/X")
               {
                  $x = strpos($row[comment],$ft);
                  if ($x!==false)
                     {
                        if ($linkbios)
                           $op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
                           ."`0\n`& "
                           .str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
                              ."`0`n";
                        else
                           $op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
                           ."`0\n`& "
                           .str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
                              ."`0`n";
                     }
               }
      /*Landschaft-Emote Ende*/

Replace
Code:
if ($ft=="::" || $ft=="/me" || $ft==":")
with
Code:
elseif ($ft=="::" || $ft=="/me" || $ft==":")

Its testet only with the Version 0.9.7+jt ext. GER (3), and maybe, yours function are a little bit other.

(Sorry for my badly Enlish ;) )


Title: Re:Chat-Emote /X: "/X The Sun is shinning" -> "The Sun is shining"
Post by: Sichae on May 28, 2005, 12:34:51 PM
Very nice. :)


Title: Re:Chat-Emote /X: "/X The Sun is shinning" -> "The Sun is shining"
Post by: Copyright on August 24, 2005, 02:49:36 AM
its really nice!
I will make a German translation of it  ;D


*checks the first post again*

Lol, i've seen, that the comments are already German  ::)


Title: Re:Chat-Emote /X: "/X The Sun is shinning" -> "The Sun is shining"
Post by: Eliwood on August 24, 2005, 09:00:12 AM
its really nice!
I will make a German translation of it  ;D


*checks the first post again*

Lol, i've seen, that the comments are already German  ::)

Hehe ;D And what would you like to translate?
Its don't give an output  :)


Title: Re:Chat-Emote /X: "/X The Sun is shinning" -> "The Sun is shining"
Post by: Copyright on August 25, 2005, 02:52:02 AM
that's why I already translated it ;D

How to install it in German? See first post ;)

=> It was a joke  ::)

© 2019 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines