Previous Thread
Next Thread
Print Thread
Rate Thread
#175355 05/18/2002 1:54 AM
Joined: Oct 2001
Posts: 60
Member
Member
Offline
Joined: Oct 2001
Posts: 60
Hi,

I sit possible in UBB to display certain categories at once? For example I have one common category and each service has its own category. Is there a way to show the common and a certain other category? Like cat 2&5 in one viwe and then in another forum 2&3?

I know you can do this with ubb threads but I would like to do it in ubb.

Thanks alot,

Jason

Sponsored Links
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
I say, you can modify your board to show a common category with others categories...

but this mod is very time intensive to code!!!
one problem is in the "common category" the jump-list to the other forums of the current category.

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Uh, actually, this should be pretty easy to code - loop the code that performs category assembly if $in{category} != $num_of_target_cat...


UBB.classic: Love it or hate it, it was mine.
Joined: Oct 2001
Posts: 60
Member
Member
Offline
Joined: Oct 2001
Posts: 60
Sir,

I am a child (and firm believer) of the multihack so can you help me out. I am so happy you found my solution, I was afraid it couldnt be done.

I found the line like you said
quote:
$in{category} != $num_of_target_cat

But I dont understand exactly what you want me to do. Soryy I am quite the newbie ;-)

Here is mine from ultimatebb.cgi, what should I change it to?

quote:
if ($ubb eq 'forum') {

if ($in{f} =~ /CAT:/) {

my ($j, $cat_number);
($j, $cat_number) = split (/:/, $in{f});
$in{category} = $cat_number;
&RequireCode("$vars_config{CGIPath}/ubb_forum_summary.cgi");
&forum_summary;
} else {
&RequireCode("$vars_config{CGIPath}/ubb_forum.cgi");
&get_forum;
}
exit(0);
} # end forum

Thanks again!!!!!!!

Jason

Joined: Oct 2001
Posts: 60
Member
Member
Offline
Joined: Oct 2001
Posts: 60
Hi,

I know Charles is probably busy but can anyone else help on this? I really dont wanna go hacking around with my level of knowledge.

Thanks again,

Jason

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Take a look around ubb_forum_summary and public_forum summary - they'll have the category handling code.


UBB.classic: Love it or hate it, it was mine.


~;

return ($CategoryStrip);

} #end category strip

sub Cat_Row {

my $row = qq~



~;

return ($row);
} # end cat row
Thanks again sir,

Jason
Joined: Oct 2001
Posts: 60
Member
Member
Offline
Joined: Oct 2001
Posts: 60
Charles,

I found the references but I dont know what to do with them. I am still new at this and I cant figure out exactly what to change.

Here are the references I think are what I need to change. Thanks for your patience with me.

ubb_forum_summary.cgi

quote:
$in{category} = "" unless exists $in{category};

if (!$in{category}) {

#&ServeFromCache("ubb_files/summary/summary.html");
my $filename = "$vars_config{NonCGIPath}/cache-$cache_cookie/ubb_files/summary/summary.html";

if ((-e $filename) && (-s $filename) && ($vars_misc{use_cache} ne "no")) {
my $file = &OpenFileAsString($filename);
$file = &ProcessVIEWS($file);
print &FilterPNTF($file);
exit(0);
} else {
&ServeFromCache("ubb_files/summary/summary.html");
} #endif

} else {

if ($vars_display{CategoriesOnly} ne 'false') {

# if this is a category-only view & specific category is selected
#&ServeFromCache("ubb_files/summary/summary-$in{category}.html");
my $filename = "$vars_config{NonCGIPath}/cache-$cache_cookie/ubb_files/summary/summary-$in{category}.html";

if ((-e $filename) && (-s $filename) && ($vars_misc{use_cache} ne "no")) {
my $file = &OpenFileAsString($filename);
$file = &ProcessVIEWS($file);
print &FilterPNTF($file);
exit(0);
} else {
&ServeFromCache("ubb_files/summary/summary-$in{category}.html");
} #endif
}
}

Public_forum_summary.pl

quote:
sub CategoryStrip {

my $CategoryStrip = qq~


$CategoryName


$cat_name


$forum_count
Joined: Oct 2001
Posts: 60
Member
Member
Offline
Joined: Oct 2001
Posts: 60
Still cant figure this out, any ideas? I am jsut a novice when it comes to scripting and I dont know what to add or delete or change.

I would really like to do this though.

Thanks again,

Jason

Joined: Oct 2001
Posts: 60
Member
Member
Offline
Joined: Oct 2001
Posts: 60
Found the answer here - https://ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=28;t=000956#000002


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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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)