Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Profile CSS (Read 5891 times)
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 197
Joined: Apr 4th, 2007
Profile CSS
Nov 18th, 2008 at 4:50am
Print Post  
profileCSS_Y23_v1.7.mod
allows users to edit some
CSS Properties for Profile


Demo
[url][/url]


username: boardmodtester
password: boardmod



-------------------------------------------
Intructions
-------------------------------------------


1. install the mod

2. upload to Admin/

  ModList.pl

   upload to Sources/
 
  MyCenter.pl
  Profile.pl
  SubList.pl

   upload to Languages/English/

  profileCSS.lng

------------------------------
Mod History
------------------------------

30-11-08
fixed signaturerow UBBC issue

22-11-08
updated for YaBB2.3

26-03-08
added class for each row and text/link colors for each row
fixed typos

25-03-08
added Background-Attachment ... Position ... Repeat

27-03-08
fixed more typos ... updated Lang file ... added backround-color

screenshot (Thanx for pointing that out here's a new one)
« Last Edit: Nov 9th, 2011 at 12:13am by ChiMoHe »  

profileCSS_Y23_v1_7.zip ( 10 KB | Downloads )

soundcloud.com/chimohe
Back to top
IP Logged
 
equinehelp
Ex Member


Re: Profile CSS
Reply #1 - Nov 18th, 2008 at 9:42am
Print Post  
The one thing that stands out with this Mod is the fact that you have posted it as a beta Mod for yabb 2.3 yet the image you display from your forum shows your forum is in fact running yabb 2.2.1
  
Back to top
 
IP Logged
 
ccarr
Ex Member


Re: Profile CSS
Reply #2 - Nov 18th, 2008 at 10:57am
Print Post  
This looks like an interesting mod.

Thanks. I'll have fun playing around with it  Smiley
  
Back to top
 
IP Logged
 
Unilat
Full Member
***
Offline



Posts: 164
Location: Making Stuff
Joined: Jun 26th, 2008
Gender: Male
Re: Profile CSS
Reply #3 - Nov 22nd, 2008 at 1:01am
Print Post  
Just curious, could this have security vulnerabilities?

If I put in some color box:

#ff0000;} </style> <script>malicious javascript here</script>

Would this be input into the CSS without parsing? That would cause the end of the stylesheet that it builds and the user could then input any other browser code they wanted.
  
Back to top
WWWAIM  
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 197
Joined: Apr 4th, 2007
Re: Profile CSS
Reply #4 - Nov 22nd, 2008 at 3:52pm
Print Post  
Unilat

the font input is set for maxlength="12" .... so if the "malicious javasscript" is less than 12 characters than what you suggest seems posible ... I suppose you could change maxlength to 7 if it brings you some peace of mine.

I would like add the use of the color picker though I'm at a stubling block with how to go about it ... If anyone is feeling up to it Please and ThankYou ...

[edit]  

I suppose that what you suggest could be done through the image url field is set to maxlength="420" ... I don't know how to patch what you suggest ... sorry ... I look into it over the next few days and see how the info is parsed else where in YaBB and try to emulate.

[edit 2]

for now though I'll release a version tonight that does not have background-image:url  fields
  

soundcloud.com/chimohe
Back to top
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 197
Joined: Apr 4th, 2007
Re: Profile CSS
Reply #5 - Nov 23rd, 2008 at 6:47am
Print Post  
I just took a look see and the bg-image url field does get parsted if url does not begin with:   http://

and the font input also gets parsed .... this is a screenshot of what happens when you try to input
Code
Select All
http://<script>
http://</script>

and/or just

<script>
</script>
 



ps ... Thankyou ccarr -- Hope You All enjoy ... This mod has much potential though I'm not knowlegable to bring it to it's full potential

    ie.
  • Saves as: $userid.css
  • includes $userid.template for easy changing of
    Profile layout
  • Colorpicker
  • bg_image upload and/or select from useravatars
 

If Anyone is up to adding something to this mod will be greatly appreciated and encouraged ...

ThankYou for Your Support
Chi
  

script_profilecss.gif ( 18 KB | Downloads )
script_profilecss.gif

soundcloud.com/chimohe
Back to top
IP Logged
 
Unilat
Full Member
***
Offline



Posts: 164
Location: Making Stuff
Joined: Jun 26th, 2008
Gender: Male
Re: Profile CSS
Reply #6 - Nov 23rd, 2008 at 7:11pm
Print Post  
Yea, I took a look see as well and the Guardian does a good job of blocking it. However, there still could be issues if they have disabled guardian features.
  
Back to top
WWWAIM  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Profile CSS
Reply #7 - Nov 26th, 2008 at 8:44pm
Print Post  
ChiMoHe wrote on Nov 22nd, 2008 at 3:52pm:
I would like add the use of the color picker though I'm at a stubling block with how to go about it ... If anyone is feeling up to it Please and ThankYou ...

I got the color picker to work by looking how it was done in Admin Center (Admin/Setting_Main.pl). This bit of your code that changes the background color for PicRow:

Code
Select All
	$showProfile .= qq~
<tr class="windowbg">
          <td align="left"><b>$lang_pcss{'pbgcolor'}: </b></td>
          <td align="left"><input type="text" name="pbgPicRowcolor" size="12" value="$pbgPicRowcolor" maxlength="12" /></td>
        </tr>
  ~; 


I changed to this:

Code
Select All
	$showProfile .= qq~
<tr class="windowbg">
          <td align="left"><b>$lang_pcss{'pbgcolor'}: </b></td>
          <td align="left"><span style="vertical-align: middle;"><input type="text" name="pbgPicRowcolor" size="7" value="$pbgPicRowcolor" maxlength="7" /></span><img src="$imagesdir/palette1.gif" style="vertical-align: middle; cursor: pointer;" onclick="window.open('$scripturl?action=palette;task=templ', '', 'height=308,width=302,menubar=no,toolbar=no,scrollbars=no')" alt="" border="0" /></td>
          	<script language="JavaScript1.2" type="text/javascript">
			<!--
			function previewColor(color) {
				   document.getElementsByName("pbgPicRowcolor")[0].value = color;
			}
			//-->
			</script>
        </tr>
  ~; 


You should be able to compare it to see how it's done and add it to the rest of the color fields.

One thing I have noticed though... After installing this Mod, BBCode doesn't work in signatures when viewing the profile page, it appears as code.




« Last Edit: Jan 6th, 2009 at 4:45pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
alexant
Junior Member
**
Offline


I love boardmod.org!

Posts: 86
Joined: Apr 5th, 2007
Gender: Male
Re: Profile CSS
Reply #8 - Nov 29th, 2008 at 8:18pm
Print Post  
The mod seems to work great except from one thing. In the signature section it shows raw UBBC code rather than converting the tags.
  
Back to top
WWW  
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 197
Joined: Apr 4th, 2007
Re: Profile CSS
Reply #9 - Nov 30th, 2008 at 3:02pm
Print Post  
30-11-08
fixed signaturerow UBBC issue

in step #10 Replace
Code
Select All
${$uid.$user}{'signature'} 



with

Code
Select All
$message 

  

soundcloud.com/chimohe
Back to top
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 197
Joined: Apr 4th, 2007
Re: Profile CSS
Reply #10 - Dec 1st, 2008 at 1:46am
Print Post  
Quote:
I got the color picker to work by looking how it was done in Admin Center (Admin/Setting_Main.pl). This bit of your code that changes the background color for PicRow:



when I first tried this I used

Code
Select All
	require "$sourcedir/Palette.pl";
	$ubbcpalette .= &Palette("post"); 



Code
Select All
	$showProfile .= qq~
          <tr class="windowbg">
          <td align="left"><b>$lang_pcss{'pbgcolor'}: </b></td>
          <td align="left"><input type="text" name="pbgcolor" size="12" value="$pbgcolor" maxlength="12" /></td>
          <td align="left">$ubbcpalette</td>
        </tr>
  ~;
 



Though I was not able to get the hex value to pop into the desired field making it so you need to either remember the number and/or copy and paste

same go for the code you provided

did I miss something from your post?
or do you aslo need to copy and paste the hex value into the field?

Thankyou for your time and assistance
  

soundcloud.com/chimohe
Back to top
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Profile CSS
Reply #11 - Dec 1st, 2008 at 6:43am
Print Post  
Ah, I only tried it on the one field which worked fine, but I just tested it and the code I posted won't work on more than one field... Sorry about that!

I had a look in Settings_Security.pl to see how it is done for more than one field, but I can't get it to stick in for any more than three... I'm not too sure why....

If I suss it out I'll let you know...

Sorry again!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint