vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBcustompage 1.0 (https://vborg.vbsupport.ru/showthread.php?t=41616)

Velocd 07-27-2002 10:00 PM

vBcustompage 1.0
 
vBcustomPage
Version 1.0 | A hack by Velocd :ninja:


Update - 7/27/02 - Bug fix

I accidentally forgot to add the instructions on how to allow the admin to modify the custom page name and content via ACP.

Please refer to the 7-27-02fix.txt for instructions on how to fix it.



What does this hack do?

This integrated vB add-on will allow your users to have their own custom page built on simple HTML. In addition, the admin can specifiy a minimum post count that all users must achieve before they are allowed the creation of a custom page.



Why is it useful?
More creativity and ways for the users to express themselves on your forum. Users who do not match the postcount needed to create custom pages will want to post more in order to get it. Ofcourse this isn't going to happen just because it's written here, but the possibilities are unknown until you try it out.


Features:
  • Via the ACP users page, the admin can toggle whether a member is allowed to use custom pages.
  • Via the ACP users page, the admin can also modify the users custom page name, and also the content.
  • Javascript code filter + offensive language block
  • The name of your custom page will show up in the title bar of your custom page (big wow, I know ;))
  • ..more creativity for your users!



WARNINGS:
As with HTML in posts and signatures, the vulnerabilities of allowing your members to create pages using HTML could be risky. Please moderate your member custom pages (view the source) on a daily basis, insuring that no malicious code is hidden away somewhere.


Screenshots?
Screenshots are included in the zip.

Bugs?
None that I know of, but if you find any please let me know!



-----------------------------------------

Attached is the hack zip. If you use this hack on your forum, please click the install!

Suggestions and comments are always welcomed :)

Radon3k 07-28-2002 03:33 AM

Cool hack, might use it sometime, thanks! :)

Velocd 07-28-2002 04:47 AM

I just updated the zip, fixing a small typo in the end of the install.htm, where NEW TEMPLATES was mentioned twice :rolleyes:

There are also some area's that have strange hexademical values for the colors, this is because I accidentally left { secondaltcolor} in them and it got translated by vB accidentally. But hopefully there should be no problem in figuring it out ;)

E 07-28-2002 05:44 AM

i might edit it the code a bit too customize it for my board if u dont mind?

Lionel 07-28-2002 06:12 AM

I get a blank page when I click on the link in profile.

$userinfo[custompage] returns empty, but the info is in the database

nemesis01 07-28-2002 10:08 AM

It's a good idea, but I think it would be better if it was based on a regular vbulletin page and editable by filling in set fields at the 'create page' stage, rather than having the user be allowed to use html. I'm sure it would be possible to do that, replacing the html part for the more limited but 'safer' VBcode. For a big board with a lot of regular users it would be very time consuming to check each members page to make sure the content was non-malicious.

Chris M 07-28-2002 10:32 AM

Great hack Velocd!

I was thinking of making this myself, but you saved me the trouble;)

Hmmm...

Why dont you make it so that Admins can make one without needing to get a certain amount of posts?

Satan

proxyMX 07-28-2002 01:47 PM

i am a huge fan of lesanes store hack, this could be a buy feature in it

DrkFusion 07-28-2002 03:30 PM

Nice work man, isntalling this right now.

Drk

eXtremeTim 07-28-2002 04:00 PM

I might install this im just not to comfortable with allowing the html.

Chris M 07-28-2002 05:17 PM

I would prefer if it was vB code...

Also - I would prefer if Admins could use it without needing 300 posts...

Satan

ULTIMATESSJ 07-28-2002 06:02 PM

heh i see you released it after all, nice work Velocd :)

Velocd 07-28-2002 06:23 PM

Quote:

Originally posted by Lionel
I get a blank page when I click on the link in profile.

$userinfo[custompage] returns empty, but the info is in the database

Make sure you have created the template getinfo_custompage, and that it contains the following:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$bbtitle - $userinfo[custompagename]</title>
$headinclude
<body>
$header
<br>

$userinfo[custompage]

<br>
$footer

</body>
</html>

Quote:

Originally posted by proxyMX
i am a huge fan of lesanes store hack, this could be a buy feature in it
Feel free to integrate this if you like, I personally don't use Lesane store hack, but when making this hack I also thought it would make a good addition.

Quote:

Originally posted by ULTIMATESSJ
heh i see you released it after all, nice work Velocd :)
Thanks ;)


Quote:

Originally posted by hellsatan
I would prefer if it was vB code...

Also - I would prefer if Admins could use it without needing 300 posts...

Satan

Quote:

Originally posted by eXtremeTim
I might install this im just not to comfortable with allowing the html.
Quote:

Originally posted by nemesis01
It's a good idea, but I think it would be better if it was based on a regular vbulletin page and editable by filling in set fields at the 'create page' stage, rather than having the user be allowed to use html. I'm sure it would be possible to do that, replacing the html part for the more limited but 'safer' VBcode. For a big board with a lot of regular users it would be very time consuming to check each members page to make sure the content was non-malicious.
I know the idea of allowing HTML worries alot of people, and I'm personally not too fond of it, but I can never know how things turn out until I try them myself. I have it running on my forums, and those with the minimum 300 post count seem to think it's a great idea, funny thing is most these members don't even know HTML. :cheeky:

To use vBcode would seem like the most ideal way of making this hack, but then I would have to create vBcode tags for all those HTML tags, such as creating tables, embed tag, etc. And I don't have the coding experience, nor the time, to do it right now. Another way would be to have it check the HTML making sure nothing bad was being put in, but this is another thing I'm not quite sure of how to do. It has a basic checker that eliminates javascript and any other language but HTML, and thats it.

For my forums I can trust my members, mainly because my forum is relatively small, and I know all the members pretty well. Although for a forum with many many members, I know this would become a problem. You could set the enablecustompage to default off, and then if a member would like a custom page you check with them first and switch them to on. This seems even more time consuming though.

Quote:

I think it would be better if it was based on a regular vbulletin page and editable by filling in set fields at the 'create page' stage
I'm not too sure what you mean by this, could you explain alittle further nemesis01? :)

proxyMX 07-28-2002 09:29 PM

ill have a bash of integration but im more of a graphics person and im oretty clueless when it comes to php

DemiNeo0101 07-28-2002 10:55 PM

ok when i try to find
$cpnav[7]="#1C5780";

i get nothing. Is that still in members.php?

i have vb 2.2.6

mine show up more like this
$cpnav[7]="#1C5780";
and i allready have a $cpnav[8]="{firstaltcolor}"; and $cpnav[8]="{secondaltcolor}"; from myvbpad hack by firefly.

ripman 07-29-2002 08:49 AM

great hack :) I've installed it on 2.2.6

but the counter seems not to increment (X views)

check it out @ my test forum

http://forum.west.tarnow.pl/member.p...tinfo&userid=1

(server may be slooooow)

Chris M 07-29-2002 09:09 AM

@DemiNeo0101 -

Search for :

Code:

$cpnav[7]="{secondaltcolor }";
(Remeber to remove the space in {secondaltcolor })

That was only "#1C5780", because vB parses the code as that...

Satan

ripman 07-29-2002 11:28 AM

Ok - it increments.

But how to swith off user-checjk ? I would like this page do be avaliable to all surfers - not only to the registered users.

Chris M 07-29-2002 11:51 AM

In the member.php Modification, find (2nd instance):

Code:

  if ($bbuserinfo[userid]==0) {
    show_nopermission();
  }

And remove it...(This removal of code refers to the :
Code:

// ############################### start getinfo custompage by Velocd ###############################
part of the hack...

Satan

ripman 07-29-2002 12:01 PM

GREAT :) BIG THX :rambo:

DemiNeo0101 07-29-2002 12:22 PM

thanks hellsatan.

Chris M 07-29-2002 01:13 PM

Np...:)

Satan

LouChipher 07-29-2002 01:25 PM

a big hole - css etc...

can somebody code a blacklist for the html code? so you can lock abject html code...

DemiNeo0101 07-29-2002 02:01 PM

Quote:

Originally posted by Lionel
I get a blank page when I click on the link in profile.

$userinfo[custompage] returns empty, but the info is in the database

i get the same exact thing. I have that getinfo_custompage template and i ran the mysql querys.

im useing vb 2.2.6

Chris M 07-29-2002 02:12 PM

Thats strange...

I am running vB 2.2.6 and everything is running fine...

Satan

ripman 07-29-2002 03:47 PM

Mayby it would be good make something more than simple page - eg. everyone can make his own webpage - but the full one, including :

-Hiperlinks to other private pages within one account
-Images upload
-Without forum's includes (logo,buttons,etc)

What do you think about that ?

Chris M 07-29-2002 03:50 PM

Hmm...

Good, except for 2 things...

Images uploads - How do we know they wont upload p*rn?

Without forum includes - how will internet niave members get back to the forum easily?

Satan

Point Blank 07-29-2002 03:53 PM

Very nice hack. I will be using this in the future.

ripman 07-29-2002 03:56 PM

Hmmmmmm - I've removed that part of code but the problem's still there :surprised:

------member.php--------

PHP Code:

// ############################### start modify custompage by Velocd ###############################
if ($action=="custompage") {
  
$templatesused 'error_nopermission_custompage,error_nopermission_customposts,usercpnav,modifycustompage_bit,modifycustompage';
  include(
"./global.php");
  
// do modify profile form

  /* ODKOMENTOWAC JESLI STRONU PRYWATNE MAJA BYC TYLKO WIDOCZNE DLA ZAREJESTROWANYCH
  if ($bbuserinfo[userid]==0) {
    show_nopermission();
  }
  */
  

  
if ($bbuserinfo[posts]<1) {
      eval(
"standarderror(\"".gettemplate("error_nopermission_customposts")."\");");
  }

  if (
$bbuserinfo[enablecustompage] == 0) {
      eval(
"standarderror(\"".gettemplate("error_nopermission_custompage")."\");");
  }

  
// draw cp nav bar
  
$cpnav[1]="{secondaltcolor}";
  
$cpnav[2]="{secondaltcolor}";
  
$cpnav[3]="{secondaltcolor}";
  
$cpnav[4]="{secondaltcolor}";
  
$cpnav[5]="{secondaltcolor}";
  
$cpnav[6]="{secondaltcolor}";
  
$cpnav[7]="{secondaltcolor}";
  
$cpnav[8]="{firstaltcolor}";
    
$cpmenu[8]="class=\"fjsel\" selected";
  eval(
"\$cpnav = \"".gettemplate("usercpnav")."\";");

  eval(
"\$custompagebit = \"".gettemplate("modifycustompage_bit")."\";");


  
$custompage=htmlspecialchars($bbuserinfo[custompage]);

  eval(
"dooutput(\"".gettemplate("modifycustompage")."\");");
}


  
// ############################### start update custompage by Velocd ###############################
  
if ($HTTP_POST_VARS['action']=="updatecustom") {
    
$templatesused 'redirect_updatethanks';
    include(
"./global.php");

    
/* ODKOMENTOWAC JESLI STRONU PRYWATNE MAJA BYC TYLKO WIDOCZNE DLA ZAREJESTROWANYCH
    if ($bbuserinfo[userid]==0) {
      show_nopermission();
    }
    */

    
$custompage censortext($custompage);
    
$custompagename censortext($custompagename);

    
$DB_site->query("UPDATE user SET custompage='".addslashes($custompage)."', custompagename='".addslashes($custompagename)."' WHERE userid='$bbuserinfo[userid]'");

    eval(
"standardredirect(\"".gettemplate("redirect_updatethanks")."\",\"usercp.php?s=$session[sessionhash]\");");



------------------------------

ripman 07-29-2002 04:00 PM

Quote:

Originally posted by hellsatan
Hmm...

Good, except for 2 things...

Images uploads - How do we know they wont upload p*rn?

Without forum includes - how will internet niave members get back to the forum easily?

Satan

Hmm :
1. Image upload after X posts - that should prevent most people from "chating"

2. I ment that includes should be very small like a table with a theme chosen by user

3. One more thing. Every user can have pre-installed web page like.

Quote:

Hello, I'M $username. I live in $location ... etc :))
P.S I could write that hack but I'm new @ VB so knowing PHP is not enought :P

Chris M 07-29-2002 04:02 PM

Im not sure I follow...

Satan

ripman 07-29-2002 04:06 PM

I've asked how to allow non registered users to access private page - I've done what you said but still there's a LOG IN screen instead of displaying the page.

Chris M 07-29-2002 06:35 PM

Then you obviously dont allow Guests to view User Profiles...

Satan

ripman 07-29-2002 06:51 PM

hmmm

Can view members info (including other's profiles and members list) (*)Yes ()No


Ill take a look at it tommorow - now i'm to tired :P

Jalrock 07-29-2002 06:54 PM

Can this be modified to use usergroups instead of post count. If so anyone want to show me how.

I am not that good with PHP but have installed many hacks with no problems. I have been trying to creat this same hack for 3 months now and all I have managed to do is destroy my user profile pages.

Jalrock 07-29-2002 06:58 PM

Would this work?

Replace:
if ($bbuserinfo[posts]<300) {

With:
if ($bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==8) {

Chris M 07-29-2002 07:26 PM

No...

This :

PHP Code:

if ($bbuserinfo[usergroupid]!=and $bbuserinfo[usergroupid]!=and $bbuserinfo[usergroupid]!=and $bbuserinfo[usergroupid]!=8) { 

Satan

Jalrock 07-29-2002 08:23 PM

Thank You.

Velocd 07-29-2002 08:24 PM

Thanks for answering the questions HellSatan, I had no idea this hack would fill it so quickly in just a couple days. I was on a train for 12 hours yesterday up to Mt. Shasta, so I wasn't able to provide some help then.

Quote:

Originally posted by hellsatan
Hmm...

Good, except for 2 things...

Images uploads - How do we know they wont upload p*rn?

Without forum includes - how will internet niave members get back to the forum easily?

Satan

Well there is no imaging upload first of all, there is just image hotlinking from another website, but I figure that's what you meant. There is no way to prevent linking adult or offensive images, but hopefully the specific rules given on the custompage screen in the user profile will make it VERY clear. Also allowing members with a certain postcount, should be high, should allow those common with the forum rules to know whats right and wrong. Just be sure you moderate the pages, maybe create a new usergroup just for moderators that check the pages, insuring the code is safe and there is no bad content.

Quote:

Originally posted by ripman
Mayby it would be good make something more than simple page - eg. everyone can make his own webpage - but the full one, including :

-Hiperlinks to other private pages within one account
-Images upload
-Without forum's includes (logo,buttons,etc)

What do you think about that ?

Having multiple pages might be a consideration for a future version of this hack, but I have no intention right now in adding that feature. Same goes with image upload, and actually I probably won't ever release image upload unless somebody else wants to code it out, only because your forum isn't meant to be a private Angelfire, or whatever..

For your third request, this can be done very simple.
Just replace the template getinfo_custompage with the following:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$bbtitle - $userinfo[custompagename]</title>
</head>

$userinfo[custompage]

</html>

All I really did was remove the $header, $headinclude, and $footer. NOTICE though that I removed the <body> and </body> tags, this means in the modifycustompage screen, your users will have to add the <body></body> tags within the body content field. If you add it default like this: <body></body>, I believe your vB will modify it to it's style replacement set value. But if you specify <body bgcolor="#345678"></body>, it will set the background color to that hexadecimal value.

-------------------------------

Those still recieving a blank page when you click on the custompage link in the user profile, I'm not too sure what to say but make sure you follow the instructions exactly doing everything as told.

Thanks for all the feedback :)

Chris M 07-29-2002 08:33 PM

Any news on the Admins dont need 300 posts front?

Satan


All times are GMT. The time now is 10:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01527 seconds
  • Memory Usage 1,859KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete