News:

Join the Facebook Fan Page.

Main Menu

wap url's

Started by cavendano, October 18, 2008, 09:05:56 AM

Previous topic - Next topic

cavendano

I am having a problem modifying the wireless.template.php file. I need the wap side to output anything I put in between the [url] right now its only outputting the text but not the link.
I did perform a search before asking this and the closest it came to was outputting images on wap.

Rumbaar

I might move this to SMF coding section and/or Graphics and Templates.  But I'll ask, does wap2 meet the needs?  I'm not sure by it has different parse parameters?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

cavendano

actually I got it to work somewhat....
function ubbcode($posting) {
      $posting=eregi_replace("\[img\]([^\[]+)\[/img\]","<img src=\"\\1\" border=\"0\">",$posting);
      $posting=eregi_replace("\[email\]([^\[]+)\[/email\]","<a href=\"mailto:\\1\">\\1</a>",$posting);
      $posting=eregi_replace("\[email=([^\[]+)\]([^\[]+)\[/email\]","<a href=\"mailto:\\1\">\\2</a>",$posting);
      $posting=eregi_replace("\[url=([^\[]+)\]([^\[]+)\[/url\]","<a href=\"\\1\">\\1</a>",$posting);
      $posting=eregi_replace("\[url\]([^\[]+)\[/url\]","<a href=\"\\1\">\\1</a>",$posting);
         $posting=eregi_replace("\[b\]","<strong>",$posting);
         $posting=eregi_replace("\[/b\]","</strong>",$posting);
        $posting=eregi_replace("\[u\]","<u>",$posting);
        $posting=eregi_replace("\[/u\]","</u>",$posting);
        $posting=eregi_replace("\[i\]","<em>",$posting);
        $posting=eregi_replace("\[/i\]","</em>",$posting);
        $posting=eregi_replace("\&#039;","",$posting);
        $posting=eregi_replace("\target=","",$posting);
        return $posting;
    }


I added this to the wireless.php and then changed the $wireless_message part (3 in total) to....
$wireless_message = ubbcode($message['body']);

that works but now i get an error message after the first post....
QuoteCannot redeclare ubbcode () (previously declared in myrootdir/load.php:1379) in myrootdir/forum/Sources/Load.php(1744) : evald()'d code on line 711

so like I said the first post works but every post that follows gets that message

any help would be appreciated

Rumbaar

Try taking out the second function you've added, as I'm sure you can call the previous function to perform the same action.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: