Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2002
Posts: 193
Member
Member
Offline
Joined: Mar 2002
Posts: 193
Many thanks!! Just a few quick questions as I haven't done any code-removing before... I understand that there are three files to edit and one MySQL query to run:

1. postlist.php

What should I remove from this file? I see a few references to threaded in this file:

Code
// Do we link to showthreaded or showflat <br />if (!$mode) { <br />	$mode = $theme['postlist']; <br />} <br />$mode = "show$mode";


-----

Code
// If $view isn't set then it gets set to the default view <br />if ( (empty($view)) && ($userview) ) { <br />	$view = $user['U_View']; <br />} <br />elseif ( (empty($view)) && (!$userview) ) { <br />	$view = $theme['threaded']; <br />}


-----

Code
// If $postlist is threaded then we need to give them the proper <br />// button to expand or collapse the threads <br />$changestart = ""; <br />$changestop  = ""; <br />$changealt = ""; <br />if ($view == "collapsed") { <br />	$changestart = "<a href=\"{$config['phpurl']}/postlist.php?Cat=$Cat&amp;Board=$Board&amp;page=$page&amp;view=expanded\">"; <br />	$changestop = "</a>"; <br />	$changeoption = "expand.gif"; <br />	$changetext = $ubbt_lang['EXP_ICON']; <br />	$changealt = $ubbt_lang['TEXT_EXP']; <br />} <br />else { <br />	$changestart = "<a href=\"{$config['phpurl']}/postlist.php?Cat=$Cat&amp;Board=$Board&amp;page=$page&amp;view=collapsed\">"; <br />	$changestop = "</a>"; <br />	$changeoption = "collapse.gif"; <br />	$changetext = $ubbt_lang['COL_ICON']; <br />	$changealt = $ubbt_lang['TEXT_COLL']; <br />} <br /> <br />if ( ($config['dateslip']) && ($view != "expanded") ){ <br />	$datecolumn = $ubbt_lang['LAST_POST']; <br />} <br />else { <br />	$datecolumn = $ubbt_lang['POSTON_TEXT']; <br />}


-----

And lastly the section that starts with:

// If we are not doing flat posts and the view is expanded then we
// will list all the replies out in a threaded format


2. showflat.php

I see one reference to showthreaded.php here but wouldn't want to start slicing stuff out without getting the green light as to exactly what needs to be removed:
Code
 <br />} <br />		$postrow[$rownum]['replyto'] = "[Re: <a href=\"{$config['phpurl']}/showthreaded.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}{$postrow[$rownum]['ParentPost']}{$var_sep}page{$var_eq}$page{$var_sep}vc{$var_eq}1\" target=\"_new\" title=\"[Re: #{$postrow[$rownum]['ParentPost']}]\" alt=\"[Re: #{$postrow[$rownum]['ParentPost']}]\"> {$parentarray[$rowparent]}</a>]"; <br />	} <br />


3. editdisplay.php

Code
// Predefine some variables <br />$defselected = ""; <br />$nopictureview = ""; $yespictureview = ""; <br />$categories = ""; $mi = ""; $cp = ""; <br />$default = ""; $d1 = ""; $d2 = ""; $w1 = ""; $w2 = ""; $w3 = ""; $m1 = ""; $m3 = ""; $m6 = ""; $y1 = ""; $allofthem = ""; <br />$DS = ""; $AS = ""; $DP = ""; $AP = ""; $AD = ""; $DD = ""; <br />$flat = ""; $threaded = ""; <br />$expanded = ""; $collapsed = "";


-----

// Find out if they already have a display preference
if($Display == "flat") { $flat = "selected="selected""; };
if($Display == "threaded") { $threaded = "selected="selected""; }

-----

// Find out if they have a view preference
if($View == "collapsed") { $collapsed = "selected="selected""; }
if($View == "expanded") { $expanded = "selected="selected""; }

I'd like to set the preferences to a) flat -and- b) collapsed, what MySQL queries need to be run to set those for all users? Also, what should I remove from this file beforehand so that people can't alter these settings - should I simply erase all these lines completely (the last two parts that is) before/after running the queries?

On a side not, I'd also like to get rid of the Expand option from the templates, maybe once I cut out 'threaded mode' then someone could kindly help me get rid of 'expanded view' as well?

Sponsored Links
Entire Thread
Subject Posted By Posted
I need to "surgically" remove threaded/expand options... help...! Conrad 12/06/2004 5:17 AM
Re: I need to "surgically" remove threaded/expand options... help...! Medar 12/06/2004 5:02 PM
Re: I need to "surgically" remove threaded/expand options... help...! Conrad 12/06/2004 11:01 PM
Re: I need to "surgically" remove threaded/expand options... help...! Conrad 12/09/2004 8:59 PM
Re: I need to "surgically" remove threaded/expand options... help...! Charles Capps 12/09/2004 9:35 PM
Re: I need to "surgically" remove threaded/expand options... help...! Conrad 12/10/2004 3:37 PM
Re: I need to "surgically" remove threaded/expand options... help...! Medar 12/10/2004 5:48 PM
Re: I need to "surgically" remove threaded/expand options... help...! Conrad 12/10/2004 6:03 PM
Re: I need to "surgically" remove threaded/expand options... help...! Conrad 12/13/2004 3:59 PM
Re: I need to "surgically" remove threaded/expand options... help...! Conrad 12/22/2004 5:27 PM
Re: I need to "surgically" remove threaded/expand options... help...! Astaran 12/22/2004 8:17 PM

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,574
Posts293,926
Members13,850
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 20240506)