Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
In 5.3 the profile setting for "Preveiw Posts" doesn't seem
to work. I've set it to default to off but its not!

Regards

Paul


Sponsored Links
Joined: Jan 2001
Posts: 76
Journeyman
Journeyman
Offline
Joined: Jan 2001
Posts: 76
Yes, this was reported in another thread as well. It is still broken in 5.3. It's driving some of our staff nuts because they do not like using the preview. I changed the default in config.inc.php OFF and the preview is still being used. :)

It also does not work in the Personal Profile either.

Jhariden (aka Strategist)
Stratics Forums

Joined: Dec 1999
Posts: 37
Power User
Power User
Offline
Joined: Dec 1999
Posts: 37
i can confirm this bug also in php v 5.3



tgnb
Joined: Dec 1999
Posts: 37
Power User
Power User
Offline
Joined: Dec 1999
Posts: 37
Ii just want to bring this to the top again since its a pretty annoying bug.




tgnb
Joined: Dec 1999
Posts: 37
Power User
Power User
Offline
Joined: Dec 1999
Posts: 37
Back to the top with this annoying bug :)



tgnb
Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Another one that I think I have fixed but don't quite have the fix pinpointed to release, if that makes any sense.


UBB.threads Developer
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
In reply to:

Another one that I think I have fixed but don't quite have the fix pinpointed to release, if that makes any sense




Lots actually. []/w3timages/icons/smile.gif[/] Hate it when that happens don't you.



Scott Cargill -WebMaster
East Hills Kung Fu San Soo

Joined: Sep 1999
Posts: 33
Power User
Power User
Offline
Joined: Sep 1999
Posts: 33
Hello Scream,

Here is the fix for the phantom Preview on/off problem. It was caused by a couple of issues but I think this fixes it.

At line 144 (below "// Find out if they preview or not" comment) it should be:


if ($Preview == "on") {
$previewon = "selected";
}
else {
$previewoff = "selected";
}




Then at line 292 where we set the preview off selection, it should be:


<option value = "" $previewoff>$lang[TEXT_OFF]</option>




We have to set it to null because in many other places where $Preview is
checked the statement
"if ( ($Preview == "on") || ($Preview) ) {"
is used. So we can't put anything in there if it is off. Search for $Preview
in all the files and you can see that it is used in different ways, sometimes
"if ( ($Preview == "on")"
and other times just
"if ( ($Preview)".

Anyway I think this ought to fix the problem the Edit Profile issue.

PS On a side note, I noticed when I previewed this message I didn't get a blank line after the closing pre command. Interesting. I had to put the blank line within the pre markup.

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
that only fixes it in profiel if you try to make a new post or reply a thread you still preview i think you might need to change the config from 0 to "" onyl problem i have with it is if i try to change it through admin paenel it will change it back i try editeign it editconfig file but that keeps giving me an eroro in main.inc.php


Joined: Mar 2001
Posts: 9
Newbie
Newbie
Offline
Joined: Mar 2001
Posts: 9
We did away with the "on" / "off" settings and converted it all to boolean (0/1). It probably required more modifications than would have been necessary the other way, but it just seems more proper:

editdisplay.php (starting at line 143)

// ********** Change below section **********

// Find out if they preview or not
if ($Preview == NULL) {
$Preview = $config[preview];
}
if ($Preview) {
$previewon = "selected";
}
else {
$previewoff = "selected";
}

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

(starting at line 291)

<select name = "Preview" class="formboxes">
<option value = "0" $previewoff>$lang[TEXT_OFF]</option> // *modify*
<option value = "1" $previewon>$lang[TEXT_ON]</option> // *modify*
</select>

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

newreply.php and newpost.php (starting at line 37)

// ********** Change below section **********

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

(remove following lines a few lines down - lines 46-48)
if ( ($Preview) || ($Preview == "on") ){
$Pselected = "checked";
}

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

sendprivate.php (starting at line 30)

// ********** Change below section **********

// Find out if they get the default preview or not
$Preview = $user[U_Preview];
if ($Preview == NULL) {
$Preview = $config[Preview];
}
if ($Preview) {
$Pselected = "checked";
}

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

mess_handler.php (starting at line 136)

// ********** Change below section **********

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

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

mess_reply.php (starting at line 65)

// ********** Change below section **********

// Find out if they get the default preview or not
$Preview = $user[U_Preview];
if ($Preview == NULL) {
$Preview = $config[Preview];
}
if ($Preview) {
$Pselected = "checked";
}

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

MySQL (Optionally these commands can be done from the admin menu in the board)
The UPDATE lines changes any existing user data to the boolean (0/1) values.

Login.
use wwwthreads
UPDATE w3t_Users SET U_Preview="1" WHERE U_Preview="on";
UPDATE w3t_Users SET U_Preview="0" WHERE U_Preview="off";
quit


We also changed the variable length in the database table to a single char as well, and modified the createtable.php file likewise, but this isn't necessary.



Sponsored Links

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)