Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #71  
Old 10-03-2014, 10:18 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anything in the error logs?
Reply With Quote
  #72  
Old 10-03-2014, 10:29 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not the mod you helped with, it's a fresh mod I'm making stylevars for.
Reply With Quote
  #73  
Old 10-03-2014, 11:40 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you pm me the XML file on my site, I can look at it later today.
Reply With Quote
  #74  
Old 10-03-2014, 11:48 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
If you pm me the XML file on my site, I can look at it later today.
I will later. Does this look OK? I am wanting to make an option to choose whether links are underlined or not when hovered over. I have made the option for the mod and if selected yes, then links will be underlined. If selected no, they won't be.

Code:
if ($vbulletin->options['url_active']) {

if ($vbulletin->options['url_text_decoration']) {
  $decoration = 'underline';
}else{
  $decoration = 'none';
}
}


vB_Template::preRegister('url.css',array('decoration' => $decoration));
Then in url.css I have this:
Code:
        text-decoration: $decoration;
Reply With Quote
  #75  
Old 10-14-2014, 09:12 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I go about adding a setting from a mod into a plugin?

I want to add an input box into my mod which an admin can enter a URL or name etc, then have the setting output the value via a plugin.

--------------- Added [DATE]1413282284[/DATE] at [TIME]1413282284[/TIME] ---------------

I know I can add this to a template:
Code:
{vb:raw vboptions.this_settings}
But I wondered if I can also add it into a plugin or is there a different way to do it?

I suppose I would be better off creating a template, putting my code inside it, then running a plugin to call the template to insert it inside the showthread template?
Reply With Quote
  #76  
Old 10-14-2014, 11:32 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kinda hard to say without 1, seeing your code, 2, knowing what it is you are trying to do and 3, knowing what the expected end result is desired.
Reply With Quote
  #77  
Old 10-14-2014, 11:40 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I was in the middle of making it work. I got it in the end. I am looking for your help ozzy, I will PM you my question.

--------------- Added [DATE]1413304843[/DATE] at [TIME]1413304843[/TIME] ---------------

Looking for a way to show all available forums so I can make my mod work on only chosen forums. Any tutorial about how to achieve this?
Reply With Quote
  #78  
Old 10-31-2014, 08:56 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to remove a chunk of code from a template using plugins? I know about the str_replace function but what about removing 20 lines from a template?

SHOWTHREAD template for example, how would I remove this:
Code:
<vb:if condition="$show['threadrating']">
                <li class="popupmenu" id="threadrating">
                    <h6><a class="popupctrl" href="javascript://">{vb:rawphrase rate_this_thread}</a></h6>
                    <div class="popupbody popuphover">
                        <form action="threadrate.php" method="post" id='showthread_threadrate_form'>
                            <ul>
                                <li id="threadrating_current"<vb:if condition="!$show['rating']">class="hidden"</vb:if> title="{vb:rawphrase thread_rating_x_votes_y_average, {vb:raw thread.votenum}, {vb:raw thread.voteavg}}"><label>
                                    <span class="rating r{vb:raw thread.rating}<vb:if condition="$thread['rating'] != 5">_{vb:stylevar right}</vb:if>">{vb:rawphrase current_rating}</span>
                                </label></li>
                                <vb:if condition="$show['ratethread']">
                                    <li><label for="r5"><span class="rating r5">
                                        {vb:stylevar dirmark}<input type="radio" name="vote" value="5" id="r5" {vb:raw votechecked.5} tabindex="20" /> {vb:rawphrase excellent}
                                    </span></label></li>
                                    <li><label for="r4"><span class="rating r4_{vb:stylevar right}">
                                        {vb:stylevar dirmark}<input type="radio" name="vote" value="4" id="r4" {vb:raw votechecked.4} tabindex="21" /> {vb:rawphrase good}
                                    </span></label></li>
                                    <li><label for="r3"><span class="rating r3_{vb:stylevar right}">
                                        {vb:stylevar dirmark}<input type="radio" name="vote" value="3" id="r3" {vb:raw votechecked.3} tabindex="22" /> {vb:rawphrase average}
                                    </span></label></li>
                                    <li><label for="r2"><span class="rating r2_{vb:stylevar right}">
                                        {vb:stylevar dirmark}<input type="radio" name="vote" value="2" id="r2" {vb:raw votechecked.2} tabindex="23" /> {vb:rawphrase bad}
                                    </span></label></li>
                                    <li><label for="r1"><span class="rating r1_{vb:stylevar right}">
                                        {vb:stylevar dirmark}<input type="radio" name="vote" value="1" id="r1" {vb:raw votechecked.1} tabindex="24" /> {vb:rawphrase terrible}
                                    </span></label></li>
                                    <li class="formsubmit"><input type="submit" class="button" value="{vb:rawphrase vote_now}" tabindex="25" /></li>
                                <vb:else />
                                    <li><label>{vb:rawphrase already_rated_this_thread}</label></li>
                                </vb:if>
                            </ul>
                            <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                            <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                            <input type="hidden" name="t" value="{vb:raw threadid}" />
                            <input type="hidden" name="pp" value="{vb:raw perpage}" />
                            <input type="hidden" name="page" value="{vb:raw pagenumber}" />
                        </form>
                    </div>
                    <script type="text/javascript">
                    <!--
                        vB_AJAX_ThreadRate_Init('showthread_threadrate_form', {vb:raw threadinfo.threadid});
                    //-->
                    </script>
                </li>
            </vb:if>
I could use a plugin to render a new showthread template with my customisation but thought there may be a way to remove it from the original template?
Reply With Quote
  #79  
Old 10-31-2014, 09:32 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why remove or hide the code, just set the $show['threadrating'] to false.
Reply With Quote
  #80  
Old 10-31-2014, 10:32 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Because I want use the etiket template mod to put the options above the thread.
Reply With Quote
Reply


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 01:23 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.04592 seconds
  • Memory Usage 2,289KB
  • Queries Executed 12 (?)
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
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete