Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
#143672 02/24/2002 4:33 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
This hack allows you to make threads stay at the top of the thread listing untill de-topped. you can also temporarily bump a thread to the top, as if it had been replied to (without replying of course).

Updated for the 6.2.x series. Report bugs/problems here.

http://www.jordodesigns.com/mods/stickythreads6.2.x.zip

UPDATED TO 1.6
On subtle suggestion from CC, the underlying code of this hack has been rewritten to work differently. If you install this new version, your old sticky threads will not be recognized as sticky by the new version.

also, most, if not all, of the html should be x-ised at this point.

Sponsored Links
#143673 02/24/2002 4:56 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Even though only admins and mods can use the feature, you should do input validation on $in{t}... there's nothing stopping me from putting arbritary data there instead of a topic number...

Looking at the entire directory for sticky files / trying to stat() a sticky file can also be very resource intensive. You should consider hijacking UpdateForumTopics to write out another hash that carries the sticky index...


UBB.classic: Love it or hate it, it was mine.
#143674 02/24/2002 5:59 PM
Joined: Jun 2001
Posts: 297
Member
Member
Offline
Joined: Jun 2001
Posts: 297
So is what CC said done?

#143675 02/24/2002 6:32 PM
Joined: Jan 2002
Posts: 65
Member
Member
Offline
Joined: Jan 2002
Posts: 65
I am going to wait till the readme is updated for what Charles Caps said aboutt he resources and shiznits. I hope Jordo can do what he istalking about. If ya can't please tell us so i will just install what ya got here.

#143676 02/24/2002 7:52 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
quote:
Originally posted by Charles Capps:
Even though only admins and mods can use the feature, you should do input validation on $in{t}... there's nothing stopping me from putting arbritary data there instead of a topic number...

considering only admins and mods can its not a big deal, but i see your point.

quote:
Originally posted by Charles Capps:

Looking at the entire directory for sticky files / trying to stat() a sticky file can also be very resource intensive. You should consider hijacking UpdateForumTopics to write out another hash that carries the sticky index...

it doesnt search the dir, nor use stat.

Sponsored Links
#143677 02/24/2002 8:49 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
-e == a call to stat()

What I MEANT to say is that doing a -e (therefore a stat) on a .sticky file for each topic can be very resource intensive...


UBB.classic: Love it or hate it, it was mine.
#143678 02/24/2002 9:41 PM
Joined: Jan 2002
Posts: 65
Member
Member
Offline
Joined: Jan 2002
Posts: 65
Well someone tell me when I can Download and install this hack because i amr really looking forward to it. Thanks. Just tell me when you have everything worked out.

#143679 02/24/2002 10:22 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
The hack is fine as it is. If you had it installed with 6.1 and didn't notice any bad side effects, then you should be fine. smile


UBB.classic: Love it or hate it, it was mine.
#143680 02/25/2002 12:38 AM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
quote:
Originally posted by Charles Capps:
-e == a call to stat()

What I MEANT to say is that doing a -e (therefore a stat) on a .sticky file for each topic can be very resource intensive...

stat() isnt called for all file tests, its only used for the ones pertaining to permissions. so -e != a call to stat()

#143681 02/25/2002 2:58 AM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
The way I'm reading perlfunc, it seems that everything does a stat, but I'm not sure.

Still, it's not something that you should be doing. smile


UBB.classic: Love it or hate it, it was mine.
Sponsored Links
#143682 02/25/2002 1:37 PM
Joined: Mar 2001
Posts: 117
Member
Member
Offline
Joined: Mar 2001
Posts: 117
woot a big argue here tipsy

But the speed is just fine here laugh

#143683 02/25/2002 2:56 PM
Joined: May 2001
Posts: 29
Spotlight Runner-Up
Spotlight Runner-Up
Offline
Joined: May 2001
Posts: 29
everytime i do this hack, my "recent visitors" table disapears!

frown

anyone?

(yes it's on)

#143684 02/25/2002 3:32 PM
Joined: Feb 2001
Posts: 2,285
Old Hand
Old Hand
Joined: Feb 2001
Posts: 2,285
Installed easily on 6.2.1.

Thanks jordo!

#143685 02/25/2002 11:20 PM
Joined: Sep 2001
Posts: 170
Member
Member
Offline
Joined: Sep 2001
Posts: 170
Jordo - I believe,

in ubblib posting:
if (-e "$vars_config{NonCGIPath}/$exact_path/$_[1].stick") {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_detop_thread});
} else {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_top_thread});

Shouldn't this be:
if (-e "$vars_config{NonCGIPath}/$exact_path/$_[1].stick") {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_detop_thread});
} else {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_top_thread});

& should be ;

Also in ubb_forum.cgi (for both the find and the replace)

if ($value >= $DPJulian) {
$count++;
} else {
delete($forum_topics{$key});

should be:

if(($value >= $DPJulian) or ($this_forum[15] eq "abc")) {
$count++;
} else {
delete($forum_topics{$key});

Also, in ubb_topic_maint.cgi (sub_top_topic,sub_detop_topic, and sub_bump_topic)
I know its not a big deal since its a cgi, not a pl file, but

should be

, should be

By the way, I also created a multihack file for this if you want, I can send it to you.

#143686 02/26/2002 1:34 AM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
thanks for pointing those out MrStormyNights. file updated.

sure, send me the mhack and ill post it in the top thread. thanks.

#143687 02/26/2002 3:37 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Stormy, acually, it also matters in CGI files. It only doesn't matter in CP cgi/pl files...

#143688 02/26/2002 7:54 AM
Joined: Sep 2001
Posts: 170
Member
Member
Offline
Joined: Sep 2001
Posts: 170
jordo
I sent you a pm with the link to the file so you can d/l the multihack

LK, thanks for the clarification. I just meant that the CGI files have not been done yet, But I do agree any hacks added should be fully XHTML compliant.

#143689 02/26/2002 7:57 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
updated to 1.6, read 1st post in thread.

#143690 02/26/2002 8:05 PM
Joined: Jan 2002
Posts: 65
Member
Member
Offline
Joined: Jan 2002
Posts: 65
IS there something wrong if we keep the old sticky that was here? What changes have been made? Thanks.

#143691 02/26/2002 8:37 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
quote:
Originally posted by Nemesis138613:
IS there something wrong if we keep the old sticky that was here? What changes have been made? Thanks.

no theres nothing wrong with it. this is just a structural update that makes it a bit more standardized with the way ubb does things. instead of using .stick files it now keeps one file for each forum in a sub folder of the members dir that has a hash of that forum's sticky threads. theres shouldnt be any difference in speed whatsoever.

#143692 02/26/2002 8:52 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Nifty. laugh


UBB.classic: Love it or hate it, it was mine.
#143693 02/27/2002 4:33 AM
Joined: Sep 2001
Posts: 170
Member
Member
Offline
Joined: Sep 2001
Posts: 170
########===================
######## in cp_vars_style_core.pl (Template):
########===================

########after:

&RegField(qq!Delete Topic (Admin) Icon


!, "delete_topic", "yes", "30", "60", "", "$vars_style{delete_topic}");

######## add:

&RegField(qq!Top thread (Admin) Icon


!, "top_thread", "yes", "30", "60", "", "$vars_style{top_thread}");

&RegField(qq!DeTop thread (Admin) Icon


!, "detop_thread", "yes", "30", "60", "", "$vars_style{detop_thread}");

Should be (XHTML'd - I know this is a control panel thing and not really required, but hey, why not do it anyway?):
########===================
######## in cp_vars_style_core.pl (Template):
########===================

########after:

&RegField(qq!Delete Topic (Admin) Icon


!, "delete_topic", "yes", "30", "60", "", "$vars_style{delete_topic}");

######## add:

&RegField(qq!Top thread (Admin) Icon


!, "top_thread", "yes", "30", "60", "", "$vars_style{top_thread}");

&RegField(qq!DeTop thread (Admin) Icon
<

!, "detop_thread", "yes", "30", "60", "", "$vars_style{detop_thread}");

Also Jordo, I'll have a new Sticky V 1.6 multihack file done in a sec, I'll update the link I sent you and pm you with details again.

#143694 02/27/2002 4:43 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Maybe the next version will be like polling, in the first line of the topic file.cgi as ||sticky after ||[poll#]?

#143695 02/27/2002 4:57 AM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
quote:
Originally posted by LK:
Maybe the next version will be like polling, in the first line of the topic file.cgi as ||sticky after ||[poll#]?

no way im touching the topic file format.

#143696 02/27/2002 5:51 AM
Joined: Sep 2001
Posts: 170
Member
Member
Offline
Joined: Sep 2001
Posts: 170
jordo

More xhtml stuff smile - also updated multihack file with these changes since you hadn't read my pm yet.

in ubb_lib_posting.cgi:

if (-e "$vars_config{MembersPath}/sticky/$forum_number.cgi") {
%sticky = ();
&RequireVars("$vars_config{MembersPath}/sticky/$forum_number.cgi");
if ($sticky{$topic_number} eq 'YES') {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_detop_thread});
} else {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_top_thread});
}
} else {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_top_thread});
}

Should be: (" />" for ""

if (-e "$vars_config{MembersPath}/sticky/$forum_number.cgi") {
%sticky = ();
&RequireVars("$vars_config{MembersPath}/sticky/$forum_number.cgi");
if ($sticky{$topic_number} eq 'YES') {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_detop_thread});
} else {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_top_thread});
}
} else {
$sticky_option = qq($vars_wordlets_mods{sticky_threads_top_thread});
}

#143697 02/27/2002 11:03 AM
Joined: Feb 2002
Posts: 42
Member
Member
Offline
Joined: Feb 2002
Posts: 42
I have applied tha hack twice and for some reason there's no text showing on the move topic screen, I have edited Wordlets, so i don't know why this is.

I also reaplied the hack from fressh 1 file at a time and still no joy. frown

Anyone know why....? Please

#143698 02/27/2002 12:55 PM
Joined: Oct 2001
Posts: 157
Member
Member
Offline
Joined: Oct 2001
Posts: 157
Tonycrew, I have suggested something to your same question in the New Member's Forum. Please check if you have complied. smile


Yors Truly

Who? Me? Worry?
#143699 02/27/2002 1:52 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
original post updated with a multihack link, thanks to MrStormyNights. smile

#143700 02/28/2002 10:15 AM
Joined: Feb 2002
Posts: 34
Member
Member
Offline
Joined: Feb 2002
Posts: 34
OK, lets' see - here are my problems:

First, your zip is incomplete. You say it includes a vars_wordlets_mods file, but it doesn't, and you do not give an alternate source other than the auto wordlet mod.

I tried the auto mod and it does not work with 6.2.1 - the files do not match, and it says to do it manually. Unfortunately even the manual instructions are outdated. The manual instructions with your mod however, do line up, with the exception of the missing file.

So I modded the files by hand.

THEN, when I got the rest of it done, went to test, and found that it diasables the Recent Visitors, AND disables the wordlets for the poll features! This, of course, in addition to no wordlets for the stickythread, too.

Needs work, promising, but needs work.

#143701 02/28/2002 1:44 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
quote:
Originally posted by bglynn:
OK, lets' see - here are my problems:

First, your zip is incomplete. You say it includes a vars_wordlets_mods file, but it doesn't, and you do not give an alternate source other than the auto wordlet mod.

I tried the auto mod and it does not work with 6.2.1 - the files do not match, and it says to do it manually. Unfortunately even the manual instructions are outdated. The manual instructions with your mod however, do line up, with the exception of the missing file.

So I modded the files by hand.

THEN, when I got the rest of it done, went to test, and found that it diasables the Recent Visitors, AND disables the wordlets for the poll features! This, of course, in addition to no wordlets for the stickythread, too.

Needs work, promising, but needs work.

i took out vars_wordlets_mods.cgi when i placed the note at the bottom instructing people to download and install the mod from qasic.net, or here.

the manual instructions are out of date with what? it would help if you gave me something to work with here. a version, a url???

You have installed it wrong. i would check your additions to ubb_lib.cgi and public_forum_summary.pl...

#143702 02/28/2002 3:25 PM
Joined: Feb 2002
Posts: 34
Member
Member
Offline
Joined: Feb 2002
Posts: 34
To clarify, the manual instruction for the AUTO MOD, not your instructions, do not match up tot he files in the current 6.2.1 files. The exact texh is not found when doing the auto upgrade and it fails. Following the instruction in the auto update, the text is also not what is actually in the file. Compare the instruction to your and you will see where they differ. Yours are correct.

Do you have aowrking example of 6.2.1 with polls and recent visitors working correctly? I'd like to see it as proof. Until then, I do not think I installed it incorrectly.

You may have removed the wordlets file but you did not update your instructions, as it still clearly refers to 'the file included' several times.

#143703 02/28/2002 4:43 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
i wrote this version / tested it on 6.2.1.

MrStormyNights has it installed here:
http://www.wewfhf.com/cgi-bin/roleplay/ultimatebb.cgi

Tonycrew has it installed here
http://amiga-stuff.cjb.net/

the fact is it can be installed correctly from the manual instructions (i do not know about the mhp file).

#143704 02/28/2002 4:48 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I have it working fine on my board with POLLS and RECENT VISITORS.

I don't know about the Multihack file but the manual instructions match just fine.

http://www.reeftalk.com/cgi-bin/ultimatebb.cgi

#143705 02/28/2002 6:15 PM
Joined: Feb 2002
Posts: 34
Member
Member
Offline
Joined: Feb 2002
Posts: 34
OK, you just don't get it.

YOU DON'T INCLUDE A FILE and the auto hack doesn't work to generate it.

So HOW can it be sucessfully installed manually?

#143706 02/28/2002 6:20 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
bglynn, keep up that tone and you will find yourself forcefully removed. Mmmmmkay?


UBB.classic: Love it or hate it, it was mine.
#143707 02/28/2002 6:25 PM
Joined: Feb 2002
Posts: 34
Member
Member
Offline
Joined: Feb 2002
Posts: 34
Sorry.

So where can I get the file that's not included and won't autogenerate?

#143708 02/28/2002 7:18 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
As Jordo mentioned above, you can grab the 6.1 vars_wordlets_mods from qasic.net (works fine in 6.2), or find it here on UBBDev... (don't know where exactly it is, sorry)


UBB.classic: Love it or hate it, it was mine.
#143709 02/28/2002 7:30 PM
Joined: Feb 2002
Posts: 34
Member
Member
Offline
Joined: Feb 2002
Posts: 34
I searched, and looked for 20 min and couldn't find it here.

On the qusic site, there are two options. One is called Modification Wordlet Module 0.1, the other is called Modification Wordlets 1.0.

The ST instructions say "Wordlets Mods Hack", so I grabbed the Modification Wordlets 1.0 file, and it does not have the .cgi file in it, only the auto updater, which does not work with 6.2.1.

I just grabbed the Modification Wordlet 0.1 file, and IT does have a .cgi file in it, that I assume can be used as the file.

You should include clearer instructions in your install text, because as of right now it's at least very difficult, if not impossible to find the file on here, and very unclear as to what you need to get from qasic. If it can be found on here, I suspect it's actually called something other than whats in the text.

#143710 02/28/2002 7:41 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Well of course the installer isn't gonna work - it's the wrong version. smile

Unless I'm mistaken, the text file included in the 1.0 zip contains complete manual instructions.

Now, if I *AM* mistaken...


UBB.classic: Love it or hate it, it was mine.
#143711 02/28/2002 7:56 PM
Joined: Feb 2002
Posts: 34
Member
Member
Offline
Joined: Feb 2002
Posts: 34
The text file in the 1.0 is WAY off from the actual text in the current 6.2.1 files.

I'm going through it again right now. I'm using the blank template from the 0.1, and added the section in the ST text instructions.

I'll document any errors.

Right now I'm on the first one:

####################
ultimatebb.cgi
####################

# find:

use UBBCGI::Carp qw(fatalsToBrowser set_message);

# add below:

use vars qw(%vars_wordlets_mods);

...the closest thing I can find is:
use UBBCGI::Carp qw(fatalsToBrowser set_message carpout);

Page 1 of 4 1 2 3 4

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
Posts: 70
Joined: January 2007
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
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)