![]() |
|
|
Mod Options |
Custom User Pages - Users make pages using html/bbcode on any template safely Details »»
|
|||||||||||||||
|
Custom User Pages - Users make pages using html/bbcode on any template safely
Developer Last Online: Jun 2012
Ok this is just something i've been slapping together the past few days, using code from here, google, and whatnot. I didn't write 99% of it, but I thought up the idea!
Ok heres the deal. You want your users to be able to customize a page such as MEMBERINFO. Problem is, really customizations all look EXACTLY the same. So I thought, why not let the users just program their own html css stuff like on myspace, as well as allow bbcode. If it messes up their memberinfo page, so what. Its their own fault and they should fix it. (My members are really a close knit family of computer / car people so I think they can handle this). I trust most of them, but since this mod only allows what you specify, you can't add things like <SCRIPT> tags or php code etc. The following code works in conjunction with a custom template and an eval'd variable. To get this to work, you first have to create a new custom profile field. I don't know what the number of this field will be, so you'll have to figure that one out yourself. You should probably specify a multi line field with a lot of space. Once you create the profile field, enter the number in the code below. Next, you need to create a new template. Call it user_custompage. In this template, put one line... $mypage Then, create a plugin and link it to global_start in the plugin, put the following code...
See there where it says 'field65'? Thats where you put your profile field number. Now all that you have to do is put $mypage in whatever template you want your user's custom profile field html to show. This is possibly the most unsafe hack ever for your website, but it demonstrates a really cool principal that by specifying which tags a user can use, they can make a website. And yes, if they mess up the code, everyone will see your website all broken. ![]() This is my first whack at posting something i've hacked together, so please bear with me ![]() Here is a link to see it in action. All the stuff you see between the "MOD STARTS HERE" and "MOD STOPS HERE" is a profile field. http://www.quad4forums.com/test/member.php?u=3472 Here is the code i've entered in the profile field. I spent about 30 seconds on it, so its not a definitive example of whats possible, but it gets the idea across. I've also added the script tag so you can view my page's source and notice its not there. (I have to use strikeout so vbulletin.org doesn't parse the bbcode) MOD STARTS HERE <B><TABLE style="width: 100%; padding: 0px; border: 1px; border: 1px solid #789DB3; background-image: url(http://www.travelblog.org/Wallpaper/pix/waterfall_desktop_background-1600x1200.jpg)"><TD> <p align="center"> [b]Here is my test page[/b] [img]http://mediaengine.org/mitcht/gallery/albums/misc/My_Car_010.sized.jpg[/img] </p> <TR></TR> </TD></B></table> <DIV> <SCRIPT> <? MOD ENDS HERE BTW. This is my test forum, so its not going to be doing much! Download Now Only licensed members can download files, Click Here for more information. Screenshots Show Your Support
No members have liked this post.
|
|||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
hmm any screen shots?
No members have liked this post.
|
|
#3
|
|||
|
|||
|
Go to that link I just linked you to. A screenshot would be kinda pointless because WHATEVER you write in html, becomes the page. Its so customizable its almost ridiculous. It pretty much exactly duplicated the myspace css thing.
No members have liked this post.
|
|
#4
|
||||
|
||||
|
thank you!
No members have liked this post.
|
|
#5
|
||||
|
||||
|
it's open way to hacker my website by bbcode $ Html that is not secur
__________________
Please don't PM me , Send request or enquiry to the Forum support vBulletin Arabic, vBulletin Manual , vBulletin API No members have liked this post.
|
|
#6
|
||||
|
||||
|
Will take a look at this
Thanks
__________________
No members have liked this post.
|
|
#7
|
||||
|
||||
|
I would like to see this integrated with the current user customisation options. Allowing HTML and CSS within that would be awesome.
________ Vaporizer Vulcano No members have liked this post.
Last edited by Sweeks : 06 Apr 2011 at 12:54. |
|
#8
|
||||
|
||||
|
I don't understand why you striked out the text. Why don't you just use the [noparse] bbcode if you don't want certain code parsed?
No members have liked this post.
|
|
#9
|
|||
|
|||
|
Ok didn't even see that! Also, it *shouldn't* allow hacking because you specify the tags you want. So only allow <B> tag and thats the ONLY html tag that works. Allow the <DIV> tag and that opens up "myspace style" website design. I'm really suprised that hasn't been done before.
FACEPALM! ![]() No members have liked this post.
|
|
#10
|
||||
|
||||
|
I'm looking for something a bit similar.. but I can make this work for what I need, just having a slight problem..
When I view other profiles, it shows my info where theirs should be (from the newly created field), any idea on a fix? No members have liked this post.
|
|
#11
|
||||
|
||||
|
Originally Posted by carcomp
Aye! That's no face palm lol, that's when Data says something over the top OR Ryker just came back from Diana's office w/ a smile on his face
![]() Can you clean up your mod post when you see this, it shows the incomplete code and where the hello did that "<?" come from ![]() <b><table style="width: 100%; padding: 0px; border: 1px; border: 1px solid #789DB3; background-image: url(http://www.travelblog.org/Wallpaper/pix/waterfall_desktop_background-1600x1200.jpg)"><td ><p align="center"><b>Here is my test page</b><br>
And more details for the "members" ![]() Newly created field pulls the info from your profile when YOU view, you need to code this differently to show who's info it is in the page, this can be done via postbit templates.
__________________
Search - Some often wonder why many do not reply to their posts... has the same question been answered before? *Use the search feature. Information - Posting for help or asking a question? *Include screenshots, copied/pasted code or errors, url. Fixed - Please return to your thread/post and disclose how you resolved the issue! *Helpful for those with a similar issue in the future i.e. possibly a solution! Thanks - Thanks for your participation on vbulletin.org! ♥ No members have liked this post.
|
||||
|
#12
|
|||
|
|||
|
This is just what I was looking for , allowing me to create custom user profile fields that allow the users to install widgets on their profiles.
"Newly created field pulls the info from your profile when YOU view, you need to code this differently to show who's info it is in the page, this can be done via postbit templates." Please tell me exactly what needs to be done so when a person goes to anothers profile they see that persons info/widget? No members have liked this post.
|
|
#13
|
|||
|
|||
|
Please can someone elaborate how how to make this show that specific users custom field and not my custom field on their profile pages? This is a GREAT Hack! I will definitely nominate this for mod of the month if I can just have this small problem resolved. This allows me to let the users customize their Profile pages with their own widgets, just like all the major social sites out there like Myspace, Hi5, Tagged, Facebook and many others. Awesome Idea!
No members have liked this post.
|
|
#14
|
|||
|
|||
|
Originally Posted by ahmed-samara
Html Is already allowed in many areas of VB, If you back up your site nightly you should not worry as much.
Truly folks, people hacking your site via html or BB Code is very unlikely to happen, most of our sites are not worth their time and trouble. You can specify exactly which codes you will allow. I see most of the social sites out there enabling widgets and html on their servers and user pages IE: MySpace, Facebook, Hi5, Tagged just to name a few and funny thing is they are not going down because of some hacker. ![]() No members have liked this post.
|
|
#15
|
|||
|
|||
|
Nice, thanks.
No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Mod Options | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 10:05.











