Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 05-14-2012, 09:07 PM
nrms?'s Avatar
nrms? nrms? is offline
 
Join Date: Dec 2008
Location: Portugal
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Fix changed thread display options

Hello all,
I'm trying to change the default position of the option of presenting the topics. For versions prior to vb4.x it was easy to get there and even here in vbulletin.org topics explaining how to make this change.

My problem is that after changing the position to the top of the list of topics, works well when there is no sub-forums to present, there is a large black area, such as you can see the images attached.


I think generally for users of vb this modification would be very useful, so I ask for your help ...


Part of the original code used (FORUMDISPLAY):

PHP Code:
<vb:if condition="$show['threadslist']">

    <
div class="collapse">
        <
class="collapse" id="collapse_forum_options" href="{vb:raw  relpath}#top"><img src="{vb:stylevar  imgdir_button}/collapse{vb:raw  vbcollapse.collapseimg_info_options}_40b.png" alt="" /></a>
        <
h4 class="forumoptiontitle blockhead">{vb:rawphrase thread_display_options}</h4>
    </
div>
    <
div id="forum_options" class="forum_info_form_block">
        <
form id="forum_display_options" action="{vb:raw  $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/',  ''}forumdisplay.php" method="get" class="forum_info_form blockbody  formcontrols floatcontainer">
            <
input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
            <
input type="hidden" name="f" value="{vb:raw forumid}" />
            <
input type="hidden" name="page" value="{vb:raw pagenumber}" />
            <
input type="hidden" name="pp" value="{vb:raw perpage}" />
            <
div>
                <
div class="options_input_block">
                    <
label for="sel_daysprune">{vb:rawphrase show_threads_from_the}</label>
                    <
select class="primary" id="sel_daysprune" name="daysprune">
                        <
option value="1" {vb:raw daysprunesel.1}>{vb:rawphrase last_day}</option>
                        <
option value="2" {vb:raw daysprunesel.2}>{vb:rawphrase last_2_days}</option>
                        <
option value="7" {vb:raw daysprunesel.7}>{vb:rawphrase last_week}</option>
                        <
option value="10" {vb:raw daysprunesel.10}>{vb:rawphrase last_10_days}</option>
                        <
option value="14" {vb:raw daysprunesel.14}>{vb:rawphrase last_2_weeks}</option>
                        <
option value="30" {vb:raw daysprunesel.30}>{vb:rawphrase last_month}</option>
                        <
option value="45" {vb:raw daysprunesel.45}>{vb:rawphrase last_45_days}</option>
                        <
option value="60" {vb:raw daysprunesel.60}>{vb:rawphrase last_2_months}</option>
                        <
option value="75" {vb:raw daysprunesel.75}>{vb:rawphrase last_75_days}</option>
                        <
option value="100" {vb:raw daysprunesel.100}>{vb:rawphrase last_100_days}</option>
                        <
option value="365" {vb:raw daysprunesel.365}>{vb:rawphrase last_year}</option>
                        <
option value="-1" {vb:raw daysprunesel.all}>{vb:rawphrase beginning}</option>
                    </
select>
                    <
class="description">{vb:rawphrase use_control_to_limit_threads}</p>
                </
div>
                <
div class="options_input_block">
                    <
label for="sel_sort">{vb:rawphrase sort_threads_by}</label>
                    <
select class="primary" id="sel_sort" name="sort">
                        <
option value="title" {vb:raw sort.title}>{vb:rawphrase thread_title}</option>
                        <
option value="lastpost" {vb:raw sort.lastpost}>{vb:rawphrase last_post_time}</option>
                        <
option value="dateline" {vb:raw sort.dateline}>{vb:rawphrase thread_start_time}</option>
                        <
option value="replycount" {vb:raw sort.replycount}>{vb:rawphrase number_of_replies}</option>
                        <
option value="views" {vb:raw sort.views}>{vb:rawphrase number_of_views}</option>
                        <
option value="postusername" {vb:raw sort.postusername}>{vb:rawphrase thread_starter}</option>
                        <
vb:if condition="$show['threadratings']"><option  value="voteavg" {vb:raw sort.voteavg}>{vb:rawphrase  thread_rating}</option></vb:if>
                    </
select>
                    <
class="description">{vb:rawphrase sort_threads_by_description}</p>
                </
div>
                <
vb:if condition="$prefix_options">
                <
div class="options_input_block">
                    <
label for="sel_prefixid">{vb:rawphrase prefix}</label>
                    <
select name="prefixid" class="primary" id="sel_prefixid">
                        <
option value="" {vb:raw prefix_selected.anythread}>{vb:rawphrase any_thread_meta}</option>
                        <
option value="-2" {vb:raw prefix_selected.anyprefix}>{vb:rawphrase any_prefix_meta}</option>
                        <
option value="-1" {vb:raw prefix_selected.none}>{vb:rawphrase no_prefix_meta}</option>
                        {
vb:raw prefix_options}
                    </
select>
                    <
class="description">{vb:rawphrase select_threads_with_prefix_description}</p>
                </
div>
                </
vb:if>
                <!-- 
Group of Radio Buttons -->
                <
div class="options_input_block">
                    <
class="label">{vb:rawphrase order_threads_in}</p>
                    <
ul class="checkradio group">
                        <
li><label for="radio_asc"><input type="radio"  name="order" id="radio_asc" value="asc" {vb:raw order.asc} />  {vb:rawphrase ascending}</label></li>
                        <
li><label for="radio_dsc"><input type="radio"  name="order" id="radio_dsc" value="desc" {vb:raw order.desc} />  {vb:rawphrase descending}</label></li>
                    </
ul>
                    <
class="description">{vb:rawphrase order_threads_note}</p>
                </
div>
                {
vb:raw template_hook.forumdisplay_filters}
            </
div>
            <
div class="options_input_wrapper">
                <
div class="options_input_block">
                    <
div class="group">
                        <
input type="submit" class="button" value="{vb:rawphrase show_threads}" />
                    </
div>
                </
div>
            </
div>
        </
form>
    </
div>
    </
vb:if> 
Moved right after the section of code:
PHP Code:
{vb:raw template_hook.forumdisplay_below_subforums}
</
vb:if> 
Images of support:
> http://i47.tinypic.com/eisc37.jpg
> http://i48.tinypic.com/5vuo2b.jpg
> http://i49.tinypic.com/ka5uoo.jpg (after apply mod)

Greetings from Portugal ...
Reply With Quote
  #2  
Old 05-17-2012, 11:48 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to get a browser like Firefox or Chrome and use Firebug or Inspect Element to see what code is creating the big empty space.

Can't help off of just screenshots. If you have a link to the forum (open to the public) it would help, otherwise you'll need to check it yourself.
Reply With Quote
  #3  
Old 05-30-2012, 03:03 PM
nrms?'s Avatar
nrms? nrms? is offline
 
Join Date: Dec 2008
Location: Portugal
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have managed to fix the problem in this area to black.

Now the problem is now that when I use this snippet of code and run the "Show Threads" gives error Tokken invalid.


I leave the code I'm using and it gives this error ...

PHP Code:
<!-- START Custom Thread Display Options -->
    <
vb:if condition="$show['threadslist']">
<
div style="padding:2px 0" class="threadlisthead table">

    <
div id="forum_options" class="forum_info_form_block">
        <
form id="forum_display_options" action="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php" method="get" class="forum_info_form blockbody formcontrols floatcontainer">
            <
input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
            <
input type="hidden" name="f" value="{vb:raw forumid}" />
            <
input type="hidden" name="page" value="{vb:raw pagenumber}" />
            <
input type="hidden" name="pp" value="{vb:raw perpage}" />
            <
div>
                <
div style="float:left" class="options_input_block">
                    <
label for="sel_daysprune">{vb:rawphrase show_threads_from_the}</label>
                    <
select style="padding:1px 5px" class="primary" id="sel_daysprune" name="daysprune">
                        <
option value="1" {vb:raw daysprunesel.1}>{vb:rawphrase last_day}</option>
                        <
option value="2" {vb:raw daysprunesel.2}>{vb:rawphrase last_2_days}</option>
                        <
option value="7" {vb:raw daysprunesel.7}>{vb:rawphrase last_week}</option>
                        <
option value="10" {vb:raw daysprunesel.10}>{vb:rawphrase last_10_days}</option>
                        <
option value="14" {vb:raw daysprunesel.14}>{vb:rawphrase last_2_weeks}</option>
                        <
option value="30" {vb:raw daysprunesel.30}>{vb:rawphrase last_month}</option>
                        <
option value="45" {vb:raw daysprunesel.45}>{vb:rawphrase last_45_days}</option>
                        <
option value="60" {vb:raw daysprunesel.60}>{vb:rawphrase last_2_months}</option>
                        <
option value="75" {vb:raw daysprunesel.75}>{vb:rawphrase last_75_days}</option>
                        <
option value="100" {vb:raw daysprunesel.100}>{vb:rawphrase last_100_days}</option>
                        <
option value="365" {vb:raw daysprunesel.365}>{vb:rawphrase last_year}</option>
                        <
option value="-1" {vb:raw daysprunesel.all}>{vb:rawphrase beginning}</option>
                    </
select>
                    <
p style="display:none;" class="description">{vb:rawphrase use_control_to_limit_threads}</p>
                </
div>
                <
div style="float:left" class="options_input_block">
                    <
label for="sel_sort">{vb:rawphrase sort_threads_by}</label>
                    <
select style="padding:1px 5px" class="primary" id="sel_sort" name="sort">
                        <
option value="title" {vb:raw sort.title}>{vb:rawphrase thread_title}</option>
                        <
option value="lastpost" {vb:raw sort.lastpost}>{vb:rawphrase last_post_time}</option>
                        <
option value="dateline" {vb:raw sort.dateline}>{vb:rawphrase thread_start_time}</option>
                        <
option value="replycount" {vb:raw sort.replycount}>{vb:rawphrase number_of_replies}</option>
                        <
option value="views" {vb:raw sort.views}>{vb:rawphrase number_of_views}</option>
                        <
option value="postusername" {vb:raw sort.postusername}>{vb:rawphrase thread_starter}</option>
                        <
vb:if condition="$show['threadratings']"><option value="voteavg" {vb:raw sort.voteavg}>{vb:rawphrase thread_rating}</option></vb:if>
                    </
select>
                    <
p style="display:none" class="description">{vb:rawphrase sort_threads_by_description}</p>
                </
div>
                <
vb:if condition="$prefix_options">
                <
div style="float:left" class="options_input_block">
                    <
label for="sel_prefixid">{vb:rawphrase prefix}</label>
                    <
select style="padding:1px 5px" name="prefixid" class="primary" id="sel_prefixid">
                        <
option value="" {vb:raw prefix_selected.anythread}>{vb:rawphrase any_thread_meta}</option>
                        <
option value="-2" {vb:raw prefix_selected.anyprefix}>{vb:rawphrase any_prefix_meta}</option>
                        <
option value="-1" {vb:raw prefix_selected.none}>{vb:rawphrase no_prefix_meta}</option>
                        {
vb:raw prefix_options}
                    </
select>
                    <
p style="display:none" class="description">{vb:rawphrase select_threads_with_prefix_description}</p>
                </
div>
                </
vb:if>
                <!-- 
Group of Radio Buttons -->
                <
div style="float:left" class="options_input_block">
                    <
p style="display:none" class="label">{vb:rawphrase order_threads_in}</p>
                    <
span style="vertical-align:center" class="checkradio group">
                        <
label for="radio_asc"><input type="radio" name="order" id="radio_asc" value="asc" {vb:raw order.asc} /> {vb:rawphrase ascending}</label>
                        <
label for="radio_dsc"><input type="radio" name="order" id="radio_dsc" value="desc" {vb:raw order.desc} /> {vb:rawphrase descending}</label>
                    </
span>
                    <
p style="display:none" class="description">{vb:rawphrase order_threads_note}</p>
                </
div>
                {
vb:raw template_hook.forumdisplay_filters}
            </
div>
            <
div style="float:right;" class="options_input_wrapper">
                <
div style="float:right" class="options_input_block">
                    <
div style="float:right" class="group">
                        <
input type="submit" class="button_small" value="{vb:rawphrase show_threads}" />
                    </
div>
                </
div>
            </
div>
        </
form>
    </
div>

   </
div>
     </
vb:if>  
   <!-- 
END Custom Thread Display Options --> 
Reply With Quote
  #4  
Old 05-31-2012, 11:35 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Security token needs to be a hidden field of the form-

Code:
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
Reply With Quote
  #5  
Old 05-31-2012, 03:06 PM
nrms?'s Avatar
nrms? nrms? is offline
 
Join Date: Dec 2008
Location: Portugal
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I added this line of code above it:
Code:
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />


But it seems that this has not been
..
System Message
Invalid Action specified.
Reply With Quote
  #6  
Old 06-04-2012, 12:53 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Invalid Action Specified usually means there is a missing <input type="hidden" ...> field that is looking for a name called "action"

Code:
<input type="hidden" name="action" value="????????????" />
I have no idea what is in the ?????? - it is something you need to figure out.

Some "action" names in vBulletin are like "domanage" or "doedit" or "view"
Reply With Quote
  #7  
Old 06-14-2012, 02:27 PM
nrms?'s Avatar
nrms? nrms? is offline
 
Join Date: Dec 2008
Location: Portugal
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ BirdOPrey5 thanks for your support in this topic, I think we almost get ...

For this case what would be the right ...?


<input type="submit" class="button_small" value="{vb:rawphrase show_threads}" />

If I provide my contact msn and access to my forum where I am implementing this setting, facilitated ...?
Would you be available for this ...?
Reply With Quote
  #8  
Old 06-14-2012, 03:50 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

type "submit" is just the submit button, it looks fine to me.

I will not be able to provide private support, sorry.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:28 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.08621 seconds
  • Memory Usage 2,395KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete