PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
gazj
Hangin' Around


Joined: Apr 28, 2006
Posts: 26

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

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.

Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

gazj, thank you giving back to the community. What version of CNBYA is this for?
View user's profile Send private message Visit poster's website
gazj
Hangin' Around


Joined: Apr 28, 2006
Posts: 26

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

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
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

Thanks!
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum