|
|
Joined: Jun 2002
Posts: 670
Code Monkey
|
Code Monkey
Joined: Jun 2002
Posts: 670 |
I can figure out easily enough how to remove the little drop-down box from the templates that let a user pick how they want their posts. However, the default is to have UBB code on and HTML off. I want them both on by default for all new posts and replies. It'll just make life easier that way for everyone  Do I have to edit the addpost.php script? Or is there a field who's default I can change in the w3t_posts table of the database? Thanks!
|
|
|
|
Joined: May 2003
Posts: 1,068
Junior Member
|
Junior Member
Joined: May 2003
Posts: 1,068 |
That's defined in Edit or delete a forum > Choose Forum > Allow HTML (Use caution with this. Allowing HTML allows your users to post things like javascript which could lead to vulnerabilities) Here you can choose whether to add it on a per forum basis.
Beware, this is a pretty big security risk to leave on. Not only can someone post malicious content that could hurt your site but it will also give them the ability to add popups, etc. to their posts.
|
|
|
|
Joined: Jun 2002
Posts: 670
Code Monkey
|
Code Monkey
Joined: Jun 2002
Posts: 670 |
I have HTML allowed in most forums already. What I need is different. When you have HTML allowed, you have to manually select "HTML & UBB Code On" while making the post. If you select nothing, the default is turn UBB Code on only. I want it to be so that UBB Code AND HTML are always the default option. Then I can just remove the little select box from the template all together.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
well then find where that code is built in the template and add a SELECTED to that option.
|
|
|
|
Joined: Jun 2002
Posts: 670
Code Monkey
|
Code Monkey
Joined: Jun 2002
Posts: 670 |
The only thing in the template is this: $markupselect which I was just planning to comment out. But by removing that, all posts will be UBB code only. I need HTML on (as well as UBB code) by default, while commenting the mark-up select box out of the templates.
Last edited by donJulio; 05/17/2004 4:45 PM.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
well go find where $markupselect is built probably in the associated .php in the main script directory and follow it and as it builds the $markuoselect put a SELECTED.
|
|
|
|
Joined: Sep 2000
Posts: 159
Member
|
Member
Joined: Sep 2000
Posts: 159 |
What you need to find is the following code in newreply.php and newpost.php. You will want to make sure option value both is indicated to be selected in both files, like this :
if ( ( ($HTML == "On") && ($Markup == "On") ) || ( ($user['U_Status'] == "Administrator") || ($user['U_Status'] == "Moderator") ) ) { $markupselect .= "<option value="both" selected>{$ubbt_lang['USE_BOTH']}</option>\n";
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,834
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|