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 12-22-2009, 06:42 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default variable not registering confused.

Ok I am re-working my mod for the member action dropdown.

I have this in hook global_start as that is the only one it shows at I tried global_complete
Code:
if ($vbulletin->options['new_enable_albums'])
{
    $templater = vB_Template::create('bbr_memberaction_dropdown');
    $templater->register('memberinfo', $memberinfo);
    $template_hook['memberaction_dropdown_items'] .= $templater->render();
}
But this does not show the
Code:
{vb:raw memberinfo.userid}
Every thing else shows.
Reply With Quote
  #2  
Old 12-22-2009, 06:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does the template look like?
Reply With Quote
  #3  
Old 12-22-2009, 06:56 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
What does the template look like?
Code:
		<li class="left">
			<a href="album.php?{vb:raw session.sessionurl}u={vb:raw memberinfo.userid}" rel="nofollow">
				<img src="{vb:stylevar imgdir_siteicons}/photo.png" alt="" />
				{vb:phrase bbr_show_all_albums}
			</a>
		</li>
Hey Lynn if you help me fix this, this basic code will work for your mod too with this new hook.
Reply With Quote
  #4  
Old 12-22-2009, 07:32 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So your results is a link but without the userid in it?

Wait a sec.... this is for the postbit, right? You can't go this in the global_start hook location for a postbit - this information isn't even available at that point. You need to use a location like postbit_display_complete.
Reply With Quote
  #5  
Old 12-22-2009, 07:39 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes every thing but the userid is there.

No this is for all over the forum. The member action dropdown works on Forum Home, Showthread, In PM and I think on the blog etc. Go to your forum home page and click on a name under last post. So I want to make mine work on all of the member action dropdowns and not just the postbit. So thats why I used global_start it works every where. I tried global_complete, But it doesn't show at all.

In the member action dropdown template they use:
Code:
{vb:raw memberinfo.userid}
I don't get it.
Reply With Quote
  #6  
Old 12-22-2009, 09:03 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no way for it to work in all those places by using the global_start hook location. If you want it to work on the showthread page for the posts, you simple cannot do it at that location. You need to do it at one of the postbit_display_* locations.

For the lastpost on the forumdisplay page, you need to use the threadbit_display hook and set $memberinfo['userid'] to $thread['postuserid'], and then on the showthead page, you need to use one of the postbit_display_* locations and do a similar setting for the variable. And then for the index.php page (or forum.php page, whatever you want to call it), you have to look into where the lastpost is set there and do similar. You just can't do it with one plugin/hook location.
Reply With Quote
  #7  
Old 12-22-2009, 09:14 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well thats just stupid. Guess I will have like 4 pluigns for this one little edit.
Guess I will have to leave out blogs and CMS too.

Thanks Lynn.

I think they should of let us add to it global. Since it shows global.

It would be easier to just do a template edit. so it shows it all places.

How come we can't use what like they have in member_action_dropdown template.
Code:
{vb:raw memberinfo.userid}
It shows global.


Edit:
I could make a second member_action_dropdown template copy all their code into my new template add my code
and just use it so it shows every and one plugin to replace their template cache with my own.

But If I do that I might as well ask you if I can include your find all post mod and the ignore user in dropdown post mod from that other dude maybe even add other links that can be turned off.

I just got a idea for a nice mod where you can turn on and off links to add to the drop down.

I am now compiling a list of useful links that people may want to add to the dropdown.

The code will be different but can I use some of your ignore code.



EDIT:
This Is what I came up with.
https://vborg.vbsupport.ru/showthread.php?t=230901

Thanks again as always Lynne
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 08:52 AM.


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.04285 seconds
  • Memory Usage 2,226KB
  • 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
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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