Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
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!

Sponsored Links
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
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
Offline
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
Offline
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.
Sponsored Links
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
Offline
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";


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)