Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account
Author Message
gazj
Worker
Worker



Joined: Apr 28, 2006
Posts: 152
Location: doncaster england

PostPosted: Tue Aug 14, 2007 2:04 pm Reply with quote

Right i have searched and searched and not come up with anybody offering this edit so i come up with an edit and would liek to share it.


The first edit on the userinfo.php will make the sig image show converting the bbcode for the image to the html code for an image. The second edit will add the user_sig_bbcode_uid to the image tag this is basicly a fix as it never did this before resulting in the image not showing in the forum.

INSTRUCTIONS:

open modules/Your_Account/public/userinfo.php

roughly around line 88 find:

Code:


            } else {
                $user_email = _YA_NA;
            }
$usrinfo[user_sig] = nl2br($usrinfo[user_sig]);


after add:

Code:


         $usid = $userinfo[user_sig_bbcode_uid];
            $siggy = $usrinfo[user_sig];
         $siggy = preg_replace("#\[img:$usid\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img:$usid\]#sie", "'<img src=\"\\1' . str_replace(' ', '%20', '\\3') . '\">'", $siggy);


around line 118 find:

Code:
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._SIGNATURE."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_sig]</b></td>\n</tr>\n";


change to:
Code:
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._SIGNATURE."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$siggy</b></td>\n</tr>\n";


now go to modules/Your_Account/public/saveuser.php

on line 35 find:
Code:
$tuemail = strtolower($row['user_email']);


below add:
Code:
   $usid = $row['user_sig_bbcode_uid'];

   $user_sig = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$usid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$usid]'", $user_sig);


save and close


any problems just ask and i will try my best to help out allso for a preview visit my site but dont be let down by the lack of content it is basicly a working process as i am heaverly modding 7.6 and making my own cms for my use and one day i will release it.

DEMO LINK
 
View user's profile Send private message Visit poster's website
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Aug 15, 2007 5:46 am Reply with quote

gazj, thank you giving back to the community. What version of CNBYA is this for?

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
gazj







PostPosted: Wed Aug 15, 2007 12:37 pm Reply with quote

its tested on 4.4.1 but i imagen it will work on most version if there is a differance in the vars for the sql calls alter accordingly and it should be fine Very Happy
 
montego







PostPosted: Wed Aug 15, 2007 6:18 pm Reply with quote

Thanks!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©