vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Unread Posts and Reputation Comments (welcome box) (https://vborg.vbsupport.ru/showthread.php?t=123886)

HMBeaty 08-15-2006 01:00 AM

How can we move the text to a different place? I'd prefer it under the "Private Messages: Unread/Total"

Luke Brown256 08-15-2006 01:35 AM

Brilliant mod, i used it on 3.5 and will use it on 3.6 so handy , although i do hate coming back online and seeing something like 4578 unread posts ;P

Paul M 08-15-2006 01:55 AM

Quote:

Originally Posted by Redlinemotorsports
How can we move the text to a different place? I'd prefer it under the "Private Messages: Unread/Total"

There is no option to move it.

HMBeaty 08-15-2006 02:38 AM

Quote:

Originally Posted by Paul M
There is no option to move it.

I know there isn't......which is why I was asking how would I go about moving it to another location? obviously the code has to modified but I have no experience with product modification.

Paul M 08-15-2006 03:06 AM

You would have to edit the plugin to disable the auto template update of the navbar, and then manually edit your navbar to put $unread where you want it.

Harry72 08-15-2006 06:57 AM

Thx Paul - very useful. :rolleyes:

bubba01 08-15-2006 09:47 AM

great hack big thx form me :)

Muellmann 08-15-2006 10:13 AM

Quote:

Originally Posted by Virtex-II
It works fine for me but I would prefer to place it below the "You last visited" string. How can it be done?

Go into the XML-File and replace

Code:

$search_text = '</strong><br />';
with

Code:

$search_text = '\$vbphrase[last_visited_x_at_y]</phrase>';
Then replace
Code:

$unread = construct_phrase('<a href=\"search.php?do=getnew\">'.$vbphrase['unread_posts'].'</a><br />',$postcount['unread']);
with
Code:

$unread = construct_phrase('<br /><a href=\"search.php?do=getnew\">'.$vbphrase['unread_posts'].'</a><br />',$postcount['unread']);
If I understood the Code correctly it should work fine for you!

Muellmann 08-15-2006 11:12 AM

Quote:

Originally Posted by wii
Can this be modified to show in the header between calendar and seach, like this:

Calendar - New Posts (45) - Search

45 is just an example, this would be post count.

Thanks

I agree, that it would be good, and so I did it and tested it for you :laugh:
Step 1: Open Paul's XML-File with Notepad
Step 2:

Search for:

Code:

$vbulletin->templatecache['navbar'] = str_replace($search_text,$search_text.$unread,$vbulletin->templatecache['navbar']);
Below add these four Lines:

Code:

$vbulletin->templatecache['navbar'] = str_replace("\$vbphrase[new_posts_nav]</a>","\$vbphrase[new_posts_nav] (".$postcount['unread'].")</a>",$vbulletin->templatecache['navbar']);
              $vbulletin->templatecache['navbar'] = str_replace("\$vbphrase[new_posts_nav]</a>","\$vbphrase[new_posts_nav] (".$postcount['unread'].")</a>",$vbulletin->templatecache['navbar']);
              $vbulletin->templatecache['navbar'] = str_replace("\$vbphrase[todays_posts]</a>","\$vbphrase[todays_posts] (".$postcount['unread'].")</a>",$vbulletin->templatecache['navbar']);
              $vbulletin->templatecache['navbar'] = str_replace("\$vbphrase[todays_posts]</a>","\$vbphrase[todays_posts] (".$postcount['unread'].")</a>",$vbulletin->templatecache['navbar']);

Step 3: Re-Import the XML (allow overwrite=Yes) - Yep you're done! :cool:
And don't forget to refresh your Browser :p

Muellmann 08-15-2006 11:31 AM

Quote:

Originally Posted by Redlinemotorsports
How can we move the text to a different place? I'd prefer it under the "Private Messages: Unread/Total"

Customize just the default Searchtext for proper Replacement

Find this in Paul's XML-Product-File:
Code:

$search_text = '</strong><br />';
Replace with:
Code:

$search_text = '\$vbphrase[private_messages_nav]</phrase></if>';
Find this:
Code:

$unread = construct_phrase('<a href=\"search.php?do=getnew\">'.$vbphrase['unread_posts'].'</a><br />',$postcount['unread']);
Replace with (just to ensure to have it in the new Line):
Code:

$unread = construct_phrase('<br /><a href=\"search.php?do=getnew\">'.$vbphrase['unread_posts'].'</a><br />',$postcount['unread']);
It should normally work (untested)!
Save with Notepad - Re-Import Hack, Allow overwrite 'yes', refresh Browser :)


All times are GMT. The time now is 04:07 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.01436 seconds
  • Memory Usage 1,744KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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