Previous Thread
Next Thread
Print Thread
Rate Thread
#209739 04/04/2001 9:31 PM
Joined: Mar 2001
Posts: 9
Newbie
Newbie
Offline
Joined: Mar 2001
Posts: 9
Well, I'm not sure what's happening with an official fix to the preview bug, but since people are still complaining about it, here's a "hack" fix for it....

============================================================================================

editdisplay.php

// Find out if they preview or not
if ($Preview == "on") { // *modify* (line 144)
$previewon = "selected";

============================================================================================

newreply.php and newpost.php

if ($user[U_EReplies] == "On"){
$Eselected = "checked";
}
if ($Preview == "on"){ // *modify* (line 46 in both files)
$Pselected = "checked";
}

============================================================================================

sendprivate.php

if (!$Preview) { $Preview = $config[Preview]; }

if ($Preview == "on"){ // *modify* (line 34)
$Pselected = "checked";
}

============================================================================================

mess_handler.php

// Let's find out if they get the default preview or not.
$Preview = $user[U_Preview];
if (!$Preview) { $Preview = $config[Preview]; }
if ($Preview == "on") { // *modify* (line 139)
$Pselected = "checked";
}

============================================================================================



Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Haven't released the official fix yet because this doesn't quite fall back to the default setting properly. It's close and should get everyone by until I can get the fallback code fixed as well.


UBB.threads Developer
Sally #209741 04/04/2001 10:09 PM
Joined: Mar 2001
Posts: 9
Newbie
Newbie
Offline
Joined: Mar 2001
Posts: 9
Yes, I did notice that, but the problem is whether you are going to use a boolean value or the "on" and "off" values (since currently it's mixed). I would prefer that boolean values be used for all such variables and the variables defined in the MySQL database changed accordingly. In that case something like the following would be used for each file:

newreply.php
newpost.php
sendprivate.php
mess_handler.php
mess_reply.php

if ($Preview == NULL) {
$Preview = $config[preview];
}
if ($Preview) {
$Pselected = "checked";
}

=======================================================

and in editdisplay.php:

// Find out if they preview or not
if ($Preview == NULL) {
$Preview = $config[preview];
}
if ($Preview) {
$previewon = "selected";
}
else {
$previewoff = "selected";
}
------------------------------------------------------------------------------------
<select name = "Preview" class="formboxes">
<option value = "0" $previewoff>$lang[TEXT_OFF]</option>
<option value = "1" $previewon>$lang[TEXT_ON]</option>
</select>




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
isaac
isaac
California
Posts: 1,157
Joined: July 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 20240430)