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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2014, 08:25 PM
dabvastur dabvastur is offline
 
Join Date: Nov 2013
Location: Santiago, Chile.
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Include number of notifications in title

<font face="Franklin Gothic Medium">Dears members of this community,

I need guidance on how to set the number of notifications in the title of my forum, similar to what Facebook do when you have notifications, indication in the title of the web the number of notifications without seeing.

I tried setting the variable {vb: raw notifications_total} in the title, but does not work. Please help me

Thanks in advance
Greetings.</font>
Reply With Quote
  #2  
Old 09-22-2014, 09:16 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If all you did was reposition the variable within the "header" template, then it should have worked.

Not sure what else we can tell you, you haven't given us anything to work with.
Reply With Quote
  #3  
Old 09-23-2014, 12:46 AM
dabvastur dabvastur is offline
 
Join Date: Nov 2013
Location: Santiago, Chile.
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My title tag: <title>( {vb: raw notifications_total} ) Game Rol.net</title>, This on header template.

Tell me you need to work.

Regards and thanks.
Reply With Quote
  #4  
Old 09-23-2014, 01:12 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dabvastur View Post
My title tag: <title>( {vb: raw notifications_total} ) Game Rol.net</title>, This on header template.

Tell me you need to work.

Regards and thanks.
Code:
<title>( {vb:raw notifications_total} ) Game Rol.net</title>
Do not add a space between the "vb:" and the "raw". That is all I see.
Reply With Quote
  #5  
Old 10-05-2014, 03:48 AM
dabvastur dabvastur is offline
 
Join Date: Nov 2013
Location: Santiago, Chile.
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for the late reply.

The code not work:



Thanks for all help.
Reply With Quote
  #6  
Old 10-05-2014, 04:19 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A variable has to be registered (made available) to a particular template. I thought you were just moving the variable on the "header" template, but your picture shows a different template.

In the future please take the time to provide us with enough details so we can determine what you are doing, extra information cannot hurt especially if you are not English speaking. Make appropriate attachments. In this case attaching your template code would have helped.

What is the template name you trying to post this variable on?

Reply With Quote
  #7  
Old 10-05-2014, 06:50 PM
dabvastur dabvastur is offline
 
Join Date: Nov 2013
Location: Santiago, Chile.
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, but i'm newbie in this forum, for this, I say you: Tell me you need to work.

The template name is: FORUMHOME

EDIT: I've tested also in the template "headinclude" but not work

Regards and thanks.
Reply With Quote
  #8  
Old 10-06-2014, 05:35 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Create a plugin at hook: "forumhome_complete"

PHP Code:
// Hook: forumhome_complete
vB_Template::preRegister('FORUMHOME',array('notifications_total' => $notifications_total)); 
This registers the variable "notifications_total" on the FORUMHOME page, which is available.

Here is a great guide by @Cellarius on the subject.
https://vborg.vbsupport.ru/showthread.php?t=228078

Reply With Quote
  #9  
Old 10-06-2014, 07:05 PM
dabvastur dabvastur is offline
 
Join Date: Nov 2013
Location: Santiago, Chile.
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Solved. I appreciate very much your help, thanks.

Regards.
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 11:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08088 seconds
  • Memory Usage 2,242KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete