vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   [New Posts | New Thread | Search] on Index page (https://vborg.vbsupport.ru/showthread.php?t=122197)

Avalon111 08-23-2006 07:02 PM

Quote:

Originally Posted by ForumDog

Code:

<if condition="$forum[statusicon]=='new' OR $forum[statusicon]=='old'">
    <div class="smallfont">
          <if condition="$forum[statusicon]=='new'"><a href="search.php?$session[sessionurl]do=getnew&amp;include=f=$forum[forumid]">$vbphrase[new_posts_nav]</a> | </if>
          <a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$forum[forumid]" rel="nofollow">$vbphrase[newthread]</a>
          <if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]" rel="nofollow">$vbphrase[search]</a></if>
          <if condition="$vbulletin->options['externalrss']">| <a href="external.php?type=rss2&forumids=$forum[forumid]">RSS Feed</a></if>
          <if condition="$vbulletin->options['externalxml']">| <a href="external.php?type=xml&forumids=$forum[forumid]">XML Feed</a></if>
          <if condition="$vbulletin->options['externaljs']">| <a href="external.php?type=js&forumids=$forum[forumid]">JS Feed</a></if>
          <if condition="$show['forumsubscription']">| <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></if>
</if>

Known Issues:
- If there is no permission to start a new thread or search and there are no new posts to view but the unsubscribe link or a feed link appears then the line will begin with a |.

i have just replaced the original code with the new one you posted.

the original code showed the "New Thread", the new one doesnt.

if i change this line in the new code from
Code:

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$forum[forumid]" rel="nofollow">$vbphrase[newthread]</a>
to
Code:

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$forum[forumid]" rel="nofollow">Start New Thread</a>
it works again.

$vbphrase[newthread] wrong??

ForumDog 08-23-2006 07:15 PM

I can't reproduce that issue. Works fine either way for me.

Avalon111 08-23-2006 07:25 PM

Quote:

Originally Posted by ForumDog
I can't reproduce that issue. Works fine either way for me.

weird. trying it agin tomorrow. then i post a screenshot here.

thanks for your efforts.

Brandon Sheley 08-24-2006 04:23 AM

Quote:

Originally Posted by ForumDog
- My code uses session URLs as you are supposed to do, that code doesn't.
- Mine uses conditionals so is automatically adaptable.
- Mine is phrased (admittedly that's barely possible, but I did what I could :p)
- I know what the THIS_SCRIPT code does, I don't know what it's there for or even where it goes. But I don't think it should be used, it will prevent the links from showing up anywhere else, in the Subscribed Threads forumbit for instance. Come to that I'm not sure that $forum[link] is the correct conditional to use either...
- Mine will display as intended using the existing CSS.

So, as I guessed it had been done before but enough reason to use this one instead. :D

OK, I just thought it was coincidence that it looks just like what Keith had sent me :P

I hadn't looked through the code, I just know it works..

BTW, what do u think about the RSS link thats in the code I posted ;) I know a lot of ppl like that part of it, you may consider adding it to yours :)

cheers
-Brandon

ForumDog 08-24-2006 07:01 AM

Quote:

Originally Posted by Avalon111
i have just replaced the original code with the new one you posted.

the original code showed the "New Thread", the new one doesnt.

if i change this line in the new code from
Code:

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$forum[forumid]" rel="nofollow">$vbphrase[newthread]</a>
to
Code:

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$forum[forumid]" rel="nofollow">Start New Thread</a>
it works again.

$vbphrase[newthread] wrong??

Oops, that's the one. The phrase isn't wrong, but it's not a Global phrase so it only works on one of the forumbit types, if it's the top-level forumbit that shows on the index page it doesn't work. Just my luck to test it on the working one!

Well spotted, fixed thank you. Changed it back to ordinary text so it works on either forumbit.


Quote:

Originally Posted by Loco.M
OK, I just thought it was coincidence that it looks just like what Keith had sent me :P

I hadn't looked through the code, I just know it works..

BTW, what do u think about the RSS link thats in the code I posted ;) I know a lot of ppl like that part of it, you may consider adding it to yours :)

cheers
-Brandon

Yep, added it as an optional extra.

Quote:

Originally Posted by ForumDog
Update: Optional extras:
- Subscription code for each feed type, all conditionals so they'll only appear if you've turned that type on.

Code:

<if condition="$forum[statusicon]=='new' OR $forum[statusicon]=='old'">
    <div class="smallfont">
          <if condition="$forum[statusicon]=='new'"><a href="search.php?$session[sessionurl]do=getnew&amp;include=f=$forum[forumid]">$vbphrase[new_posts_nav]</a> | </if>
          <a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$forum[forumid]" rel="nofollow">New Thread</a>
          <if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]" rel="nofollow">$vbphrase[search]</a></if>
          <if condition="$vbulletin->options['externalrss']">| <a href="external.php?type=rss2&forumids=$forum[forumid]">RSS Feed</a></if>
          <if condition="$vbulletin->options['externalxml']">| <a href="external.php?type=xml&forumids=$forum[forumid]">XML Feed</a></if>
          <if condition="$vbulletin->options['externaljs']">| <a href="external.php?type=js&forumids=$forum[forumid]">JS Feed</a></if>
          <if condition="$show['forumsubscription']">| <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></if>
</if>



tekstylez 08-30-2006 06:15 PM

i just tried to do the update, but now new posts is not working
Code:

Invalid Forum specified. If you followed a valid link, please notify the administrator
Which code do I replace the old code with? You may want to think of re-writting this update, it is very confusing

ForumDog 08-30-2006 06:57 PM

Quote:

Originally Posted by tekstylez
i just tried to do the update, but now new posts is not working
Code:

Invalid Forum specified. If you followed a valid link, please notify the administrator
Which code do I replace the old code with? You may want to think of re-writting this update, it is very confusing

Oops, there was a typo. Corrected the first post and the text file, and re-ordered both to try to make things a bit clearer.

Use the first set of code (labelled AFTER, ADD:) if you want to reproduce the same function as the original code did, with the bugfix. Use the second, longer bit of code (labelled Optional Extras) if you would also like the above, plus links to be added for RSS/XML/JS feeds and Unsubscribe from this forum in the Subscribe part of the UserCP.

:)

tekstylez 08-31-2006 02:14 AM

OK... it works now. But, is there any way to fix the issue of the search not working for subforums on the forumhome? In another words, if a forum is not active, and you click search... of course no results will show... but is there anyway to either disable it for non active forums or have it search all subforums also?

TheBlackPoet 09-15-2006 06:32 AM

i never ever say anything negative about a hack.. as i am not smart enough to write one... but this hack.... scared the hell ouf of me... i loaded it.. and it looked good.. but something about it was right.... i went to delete the code.. and it duplicated on me....

i had to revert back to the original code. thankfully i didnt have any other scripts enbedded on that template....

ForumDog 09-30-2006 04:37 PM

Hm. Don't know what happened to my subscription notification. :confused:

Quote:

Originally Posted by tekstylez
OK... it works now. But, is there any way to fix the issue of the search not working for subforums on the forumhome? In another words, if a forum is not active, and you click search... of course no results will show... but is there anyway to either disable it for non active forums or have it search all subforums also?

To make it search all subforums, add "&childforums=1" to the search URL.

Change this:
Code:

<if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]" rel="nofollow">$vbphrase[search]</a></if>
to this:

Code:

<if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]&childforums=1" rel="nofollow">$vbphrase[search]</a></if>


All times are GMT. The time now is 02:15 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.01343 seconds
  • Memory Usage 1,761KB
  • 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
  • (10)bbcode_code_printable
  • (8)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