vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Moderators Functions - Advance Sticky Options (https://vborg.vbsupport.ru/showthread.php?t=119746)

SmEdD 06-27-2006 10:00 PM

Advance Sticky Options
 
What this Hack Does
This hack will allow you to set a Display Order for Sticky Posts (ignore any sortorder) and set an Expiry Date to unstick your posts.

Hack Info
Templates to Edit: 1 (manual)
Files to Upload: 1 (auto)
DB Changes: 1 (auto)
Plugins Added: 7 (auto)
Cron Scripts Added: 1 (auto)

Instructions
1) Download the attached file.
2) Upload the file in the "upload" folder.
3) Import the plugin.
4) Find and Replace in template threadadmin_editthread
HTML Code:

                $posticons
With:
HTML Code:

                <fieldset class="fieldset">
                        <legend>$vbphrase[sticky_options]</legend>
                        <div style="padding:$stylevar[formspacer]px">
                                <div>
                                        $vbphrase[sticky_order]<br />
                                        <input type="text" class="bginput" name="sticky_order" value="$threadinfo[sticky_order]" size="5" maxlength="3" />
                                        $vbphrase[sticky_order_desc]
                                </div>
                                <div>
                                        $vbphrase[sticky_expiry]<br />
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                          <tr>
                                                <td>
                                                        <span class="smallfont">$vbphrase[month]<br />
                                                        <select name="sticky_expiry[month]" tabindex="1">
                                                                <option value="-1" $monthselected[default]></option>
                                                                <option value="1" $monthselected[1]>$vbphrase[january]</option>
                                                                <option value="2" $monthselected[2]>$vbphrase[february]</option>
                                                                <option value="3" $monthselected[3]>$vbphrase[march]</option>
                                                                <option value="4" $monthselected[4]>$vbphrase[april]</option>
                                                                <option value="5" $monthselected[5]>$vbphrase[may]</option>
                                                                <option value="6" $monthselected[6]>$vbphrase[june]</option>
                                                                <option value="7" $monthselected[7]>$vbphrase[july]</option>
                                                                <option value="8" $monthselected[8]>$vbphrase[august]</option>
                                                                <option value="9" $monthselected[9]>$vbphrase[september]</option>
                                                                <option value="10" $monthselected[10]>$vbphrase[october]</option>
                                                                <option value="11" $monthselected[11]>$vbphrase[november]</option>
                                                                <option value="12" $monthselected[12]>$vbphrase[december]</option>
                                                        </select>
                                                        </span>
                                                </td>
                                                <td>
                                                        <span class="smallfont">$vbphrase[day]<br />
                                                        <input type="text" tabindex="1" class="bginput" name="sticky_expiry[day]" value="$sticky_expiry[day]" size="4" maxlength="2" />
                                                        </span>
                                                        </td>
                                                <td>
                                                        <span class="smallfont">$vbphrase[year]<br />
                                                        <input type="text" tabindex="1" class="bginput" name="sticky_expiry[year]" value="$sticky_expiry[year]" size="4" maxlength="4" />
                                                        </span>
                                                </td>
                                          </tr>
                                        </table>
                                </div>

                        </div>
                </fieldset>
               
                $posticons

Change Log
Version 1.5
- Updated to vBulletin 3.6
- Moved a hook location.
- Changed install code.

Version 1.0.3
- Fixed some broken uninstall code.

Version 1.0.2
- Changed the default value of sticky order from 0 to 5. This was done so you may have stickies like ?Sig Testing? that are always below new stickies.

Version 1.0.1
- Fixed Select Field size.
- Removed '' from numeric values to lessen load and speed up the script.
- Removed excess spacing just to clean up the code.
- Changed != to <> in the MySQL Query to prevent problems.

3.7.x and 3.8.x Support
Currently this is verified working up to vB version 3.8.1

The SandKiller 06-28-2006 01:09 AM

First Post, yay! Excellent

Bad Bunny 06-28-2006 04:18 AM

Hey, this sounds really cool. :)

Atakan KOC 06-28-2006 05:13 AM

Nice. Thanks. :)

iTaLiAnBoY165 06-28-2006 05:42 AM

Will this work with 3.5 or absolutely not???

SmEdD 06-28-2006 07:55 AM

Quote:

Originally Posted by iTaLiAnBoY165
Will this work with 3.5 or absolutely not???

I have already released a version for 3.5 that can be found at https://vborg.vbsupport.ru/showthread.php?t=103642

A_N_K_A_R_A 06-28-2006 02:29 PM

installede very nice

Snake 06-29-2006 05:55 PM

Thanks for the hack man!

Derekclarke 07-08-2006 09:55 PM

installed on beta 4 and is NOT working.

CypherSTL 07-08-2006 10:59 PM

Same here, with Beta 4 there is no option for display order nor sticky experation

SmEdD 07-11-2006 06:32 AM

I will look into this, I am updating to RC build right now and I will see what was changed!

CypherSTL 07-19-2006 04:34 AM

cool thank you, I had heard there was some changes made and that is most likely the reason.

Freakpyromaniac 08-09-2006 09:19 AM

I have installed it on 3.6 Rc 3 but i dont see anything.
Do i have to turn it on ?

RaceJunkie 08-09-2006 11:05 AM

Great hack I have not installed yet, but this should be a default feature in vB

ctrl-alt-del 08-14-2006 05:05 PM

Okay, I can't figure out how to get to the options made available by this hack. I can get to the Edit Post, but not Edit Thread shown in your example image. What am I missing?

ctrl-alt-del 08-14-2006 05:07 PM

As usual, as soon as I post, I found the option to Edit Thread. (Thread Tools / Moderation Tools / Edit Thread radio button)

asj 08-14-2006 09:14 PM

Thanks for man..

jgrakowski 08-17-2006 01:04 AM

this hack needs one thing to be more usefull... make it so who ever can change the order of the stickies - when viewing the threadlist in the forum, all the sticky topics have a input box on them and a save button at the bottom and top of the stickys... so you can reorder the stickys without entering each thread and then entering edit thread for each one.

o0Hubba0o 08-17-2006 11:09 PM

You should put the template edit into the zip too, I just put in a new skin and had to come find this thread to get it. Just makes it easier for people if they need to re-install in the future and forget to copy it and save it themselves like I did. :D

ctrl-alt-del 08-18-2006 01:11 AM

Quote:

Originally Posted by jgrakowski
this hack needs one thing to be more usefull... make it so who ever can change the order of the stickies - when viewing the threadlist in the forum, all the sticky topics have a input box on them and a save button at the bottom and top of the stickys... so you can reorder the stickys without entering each thread and then entering edit thread for each one.

Great suggestion. I second this feature request.

curriertech 08-18-2006 04:55 PM

*waits for 3.6 Gold version*

jgrakowski 08-18-2006 08:45 PM

oh and wouldnt it make more sense to have a ascending order? where 1 is at the top? makes 99.99999% more sense.

dutchbb 08-19-2006 01:39 AM

great hack, good work

BETIServices 08-19-2006 02:31 AM

Quote:

Originally Posted by ctrl-alt-del
As usual, as soon as I post, I found the option to Edit Thread. (Thread Tools / Moderation Tools / Edit Thread radio button)

After braking my head looking where I execute the option I found it thanks to you post.

Nice hack...

bongwater 08-20-2006 09:08 AM

installed on 3.6 gold. It shows up but it doesnt seem to unsticky the threads automatically at the expiration date

BETIServices 08-21-2006 03:36 AM

I had not test that feature yet but can somebody confirm the bug .. thanks

voteforbird 08-21-2006 02:49 PM

Any chance the expiry options can also be shown on newthread.php?

nevetS 08-29-2006 06:09 AM

Quote:

Originally Posted by bongwater
installed on 3.6 gold. It shows up but it doesnt seem to unsticky the threads automatically at the expiration date

Did you upload the file to your includes folder?

I just installed on 3.6 and all seems to work correctly. I just went into the scheduled task manager, and clicked "Run Now" on "Sticky Cleanup" and it expired a sticky for me.

If you don't have that option, you probably didn't upload the file to the correct location. it should be includes/cron/stickycleanup.php

If you do have that option, definitely try "Run Now" and see if it exhibits any error messages.

mIRCnet 09-03-2006 03:00 PM

/installed
Great hack ,
Now what about if an admin didnt specify sticky options ? Stick Expire Date or Sticky Order, does it effect in the corn ? like to unstock the thread

category 09-04-2006 06:19 AM

hack doesnt work for 3.6.0 i did everything what said uploaded the product and the includes and updated the templates

JonUrban 09-08-2006 05:45 PM

Just installed this product. It works great. THANKS!

Jon Urban
www.quadraphonicquad.com

RedWingFan 09-11-2006 03:46 PM

To add this option when you are creating a new thread, add it to your newthread template as follows.

Find the following line:

Code:

                                $threadmanagement
Add after:

Code:


<!-- ADVANCED STICKY OPTIONS -->

<fieldset class="fieldset">
                        <legend>$vbphrase[sticky_options]</legend>
                        <div style="padding:$stylevar[formspacer]px">
                                <div>
                                        $vbphrase[sticky_order]<br />
                                        <input type="text" class="bginput" name="sticky_order" value="$threadinfo[sticky_order]" size="5" maxlength="3" />
                                        $vbphrase[sticky_order_desc]
                                </div>
                                <div>
                                        $vbphrase[sticky_expiry]<br />
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                          <tr>
                                                <td>
                                                        <span class="smallfont">$vbphrase[month]<br />
                                                        <select name="sticky_expiry[month]" tabindex="1">
                                                                <option value="-1" $monthselected[default]></option>
                                                                <option value="1" $monthselected[1]>$vbphrase[january]</option>
                                                                <option value="2" $monthselected[2]>$vbphrase[february]</option>
                                                                <option value="3" $monthselected[3]>$vbphrase[march]</option>
                                                                <option value="4" $monthselected[4]>$vbphrase[april]</option>
                                                                <option value="5" $monthselected[5]>$vbphrase[may]</option>
                                                                <option value="6" $monthselected[6]>$vbphrase[june]</option>
                                                                <option value="7" $monthselected[7]>$vbphrase[july]</option>
                                                                <option value="8" $monthselected[8]>$vbphrase[august]</option>
                                                                <option value="9" $monthselected[9]>$vbphrase[september]</option>
                                                                <option value="10" $monthselected[10]>$vbphrase[october]</option>
                                                                <option value="11" $monthselected[11]>$vbphrase[november]</option>
                                                                <option value="12" $monthselected[12]>$vbphrase[december]</option>
                                                        </select>
                                                        </span>
                                                </td>
                                                <td>
                                                        <span class="smallfont">$vbphrase[day]<br />
                                                        <input type="text" tabindex="1" class="bginput" name="sticky_expiry[day]" value="$sticky_expiry[day]" size="4" maxlength="2" />
                                                        </span>
                                                        </td>
                                                <td>
                                                        <span class="smallfont">$vbphrase[year]<br />
                                                        <input type="text" tabindex="1" class="bginput" name="sticky_expiry[year]" value="$sticky_expiry[year]" size="4" maxlength="4" />
                                                        </span>
                                                </td>
                                          </tr>
                                        </table>
                                </div>

                        </div>
                </fieldset>
               
<!-- /ADVANCED STICKY OPTIONS -->

Save the template, and you're done! This will appear at the bottom of the page, directly under Thread Management.

Masters 09-18-2006 11:08 PM

This doesn't work in 3.6.1.

ctrl-alt-del 09-19-2006 12:27 PM

Quote:

Originally Posted by Masters
This doesn't work in 3.6.1.

Huh?? Yes it does....for me anyway. Unless you were talking about what RedWingFan posted...then, I haven't tried.

tspore 09-25-2006 07:34 AM

Cool mod, I have 1 request. I would like to be able to use this when a mod, sticks a topic, for like 3 days. After the first post is done. So either need it to work on the edit post, or under the edit tools/stick thread.
Thanks for making this very cool.

wjkids 10-10-2006 05:45 AM

Really would like to use this MOD. Does this work with 3.6.2?

Invalid ID 10-12-2006 01:29 AM

Can't find "Sticky Options" shown in the photo. Plz help. Thanks

TVNettet 10-12-2006 09:47 AM

Added and edited template, but couldn't even find the product in vB 3.6.2.
Have added loads of products b4, so not that green ;-)
But of course this is a great idea and can't understand wtf vB haven't made this part of the default...

Invalid ID 10-12-2006 09:59 AM

May be because it doesn't work :)

Konstantinos 12-17-2006 08:15 AM

i upgraded from 3.5.6 to 3.6.4 and i tried to overwrite the product and i get

Database error in vBulletin 3.6.4:

Invalid SQL:

ALTER TABLE vbthread
ADD sticky_order SMALLINT( 5 ) UNSIGNED DEFAULT '5' NOT NULL AFTER sticky,
ADD sticky_expiry INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL AFTER sticky_order;

MySQL Error : Duplicate column name 'sticky_order'


All times are GMT. The time now is 06:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01376 seconds
  • Memory Usage 1,861KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete