vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Advance Sticky Options (https://vborg.vbsupport.ru/showthread.php?t=103642)

Snake 12-25-2005 10:56 AM

Cool hack...

akanevsky 12-25-2005 11:28 AM

Quote:

Letme know what needs changed and I can fix em up
  • Design of the form:
    1. Two buffed up with extra words.
    2. The select field is narrower than the text fields.
    3. The controls should only show up when sticky is selected.
  • Cron:
    1. Integer fields do not require to be wrapped into single quotes. Ex: Use sticky = 0 instead of sticky = '0'
    2. In MYSQL, you use <>, not !=. Therefore, use sticky_expiry <> 0 and not sticky_expiry != '0'
    3. ### is not a MySQL way to write comments. Therefore, there might be a MySQL error when running this query.
  • [sql]DROP sticky_order,
    DROP sticky_expiry[/sql]
    I am not 100% sure, but I think it must be written like this:
    [sql]DROP sticky_order, sticky_expiry[/sql]
    If it works the way you have it, excellent :)
  • Same thing with quotes goes with your XML. You do not need to wrap numeric values into quotes. Although it doesn't matter much, it does affect speed.


SmEdD 12-25-2005 03:22 PM

Quote:

Originally Posted by Psionic Vision
  • Design of the form:
    1. Two buffed up with extra words.
    2. The select field is narrower than the text fields.
    3. The controls should only show up when sticky is selected.
  • Cron:
    1. Integer fields do not require to be wrapped into single quotes. Ex: Use sticky = 0 instead of sticky = '0'
    2. In MYSQL, you use <>, not !=. Therefore, use sticky_expiry <> 0 and not sticky_expiry != '0'
    3. ### is not a MySQL way to write comments. Therefore, there might be a MySQL error when running this query.
  • [sql]DROP sticky_order,
    DROP sticky_expiry[/sql]
    I am not 100% sure, but I think it must be written like this:
    [sql]DROP sticky_order, sticky_expiry[/sql]
    If it works the way you have it, excellent :)
  • Same thing with quotes goes with your XML. You do not need to wrap numeric values into quotes. Although it doesn't matter much, it does affect speed.


- The DROP and Comment are correct as they are.
- Fixed up the PHP and removed the '' around numeric values and removed some excess spacing.
- Fixed the select field.

In the next version I will see about making the options only show up when there is a sticky. The major problem is you can sticky the thread on that page and it uses a check box instead of a radio button so it will take some time to code it.

akanevsky 12-25-2005 03:52 PM

Quote:

The DROP and Comment are correct as they are.
Ok, sorry about it then. I was simply used to the syntax generated by phpMyAdmin.

Quote:

- Fixed up the PHP and removed the '' around numeric values and removed some excess spacing.
- Fixed the select field.
Thank you.

Quote:

The major problem is.... checkbox instead of radio button
I don't see it as a "major problem", because both checkbox and radiobutton use the same hidden "checked" parameter, and you hack should show the controls when that parameter has a state of 1, and not show the controls when the parameter has a state of 0. ;)

Enthonia Tech 12-27-2005 09:24 PM

Installed the mod but it is not workign , checked 10 times but still not workign..can you check template edits please ?

SmEdD 12-29-2005 04:14 AM

What part isn't working? And do you have the pulgin turned on?

Enthonia Tech 12-29-2005 02:55 PM

The advance sticky options isint displaying in thread edit and thread post and yes plugin is turned on! :)

SmEdD 12-29-2005 09:17 PM

Ok, do you just have on style on your forums? If you do you have to do this to all of your templates. If that dosn't help try this.

Replace template threadadmin_editthread with this. (this is the default threadadmin_editthread with the addition)
HTML Code:

<form action="postings.php" method="post" name="vbform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="t" value="$threadid" />
<input type="hidden" name="do" value="updatethread" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat">$vbphrase[edit_thread]</td>
</tr>
<tr>
        <td class="thead">$vbphrase[title]: <span style="font-weight:normal">$threadinfo[title]</span></td>
</tr>

<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
               
                <!-- subject field -->
                <table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:$stylevar[formspacer]px">
                <tr>
                        <td class="smallfont" colspan="3">$vbphrase[title]:</td>
                </tr>
                <tr>
                        <td><input type="text" class="bginput" name="title" value="$threadinfo[title]" size="50" maxlength="85" tabindex="1" title="$vbphrase[optional]" /></td>
                        <td>&nbsp;&nbsp;</td>
                        <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td>
                </tr>
                </table>
                <!-- / subject field -->
               
                <div class="fieldset">
                        $vbphrase[moderator_notes] / $vbphrase[thread_summary]:<br />
                        <input type="text" class="bginput" name="notes" value="$threadinfo[notes]" size="50" maxlength="250" />
                </div>

                <if condition="$show['undeleteoption']">
                <fieldset class="fieldset">
                        <legend>$vbphrase[deletion_status]</legend>
                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                        <tr>
                                <td>$vbphrase[item_deleted_would_you_like_to]</td>
                        </tr>
                        <tr>
                                <td>
                                        <div><label for="rb_threadstatus_0"><input type="radio" name="threadstatus" value="0" id="rb_threadstatus_0" checked="checked" />$vbphrase[leave_it_deleted]</label></div>
                                        <div><label for="rb_threadstatus_1"><input type="radio" name="threadstatus" value="1" id="rb_threadstatus_1" />$vbphrase[undelete_it_restore]</label></div>
                                        <if condition="$show['removeoption']">
                                        <div><label for="rb_threadstatus_2"><input type="radio" name="threadstatus" value="2" id="rb_threadstatus_2" />$vbphrase[physically_remove]</label></div>
                                        </if>
                                </td>
                        </tr>
                        <tr>
                                <td>
                                        $vbphrase[reason_for_deletion]:<br />
                                        <input type="text" class="bginput" name="reason" value="$threadinfo[del_reason]" size="50" maxlength="125" />
                                </td>
                        </tr>
                        </table>
                </fieldset>
                </if>
               
                <fieldset class="fieldset">
                        <legend>$vbphrase[options]</legend>
                        <div style="padding:$stylevar[formspacer]px">
                                <div><label for="cb_open"><input type="checkbox" name="open" value="yes" id="cb_open" $openchecked />$vbphrase[thread_is_open]</label></div>
                                <div><label for="cb_sticky"><input type="checkbox" name="sticky" value="yes" id="cb_sticky" $stickychecked />$vbphrase[thread_is_sticky]</label></div>
                                <if condition="$show['moderateoption']">
                                        <div><label for="cb_visible"><input type="checkbox" name="visible" value="yes" id="cb_visible" $visiblechecked />$vbphrase[thread_is_visible]</label></div>
                                </if>
                        </div>
                </fieldset>
               
                <fieldset class="fieldset">
                        <legend>Sticky $vbphrase[options]</legend>
                        <div style="padding:$stylevar[formspacer]px">
                                <div>
                                        Sticky Display Order:<br />
                                        <input type="text" class="bginput" name="sticky_order" value="$threadinfo[sticky_order]" size="5" maxlength="3" />
                                        Descending Order (0 = Lowest)
                                </div>
                                <div>
                                        Sticky Expiry Date:<br />
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                          <tr>
                                                <td>
                                                        <span class="smallfont">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">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">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
               
                </div>
        </div>
       
        <div style="margin-top:$stylevar[cellpadding]px">
                <input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" />
                <input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
        </div>
        </td>
</tr>
</table>

</form>

<if condition="$show['modlog']">
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="5">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('editthread_modlog')"><img id="collapseimg_editthread_modlog" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_editthread_modlog].gif" alt="" border="0" /></a>
                $vbphrase[moderator_log]
        </td>
</tr>
<tbody id="collapseobj_editthread_modlog" style="$vbcollapse[collapseobj_editthread_modlog]">
        <tr>
                <td class="thead" nowrap="nowrap">$vbphrase[date]</td>
                <td class="thead" nowrap="nowrap">$vbphrase[username]</td>
                <td class="thead" align="center">$vbphrase[action]</td>
                <td class="thead" align="center">$vbphrase[post]</td>
                <if condition="$show['ipaddress']">
                <td class="thead" nowrap="nowrap">$vbphrase[ip_address]</td>
                </if>
        </tr>
        $logbits
</tbody>
</table>
</if>


SmEdD 01-02-2006 10:07 AM

Any updates on how it went?

SmEdD 01-23-2006 10:14 PM

Updated to v1.0.3
- 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.
- Fixed some broken uninstall code.


All times are GMT. The time now is 03:34 AM.

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.02353 seconds
  • Memory Usage 1,851KB
  • 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
  • (1)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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