Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 12-18-2011, 01:39 PM
ReBe ReBe is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, now it works.

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

Shit, i was to early happy. First it worked, but now registered users dont see the usernames in quotes in more and more postings. For guests it seems to be working, they dont see the usernames. At least i dont fount a posting, where guest see the usernames.
Reply With Quote
  #12  
Old 12-20-2011, 06:22 PM
ReBe ReBe is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I?m going crazy... No one an idea, what the thinking error is?
Reply With Quote
  #13  
Old 12-20-2011, 06:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Turn off post caching on the whole site? Or write a plugin that looks for a string that starts with:
<img src="images/misc/quote_icon.png" alt="Quote" />
and ends with:
<img class="inlineimg" src="images/buttons/viewpost-right.png" alt="View Post" /></a>

And remove it for unregistered users? That is the code from the postparsed table, if the post isn't cached then it is different. Also, that is from my site, your paths may be different - just look in your database to see what they look like.
Reply With Quote
  #14  
Old 12-25-2011, 12:27 PM
ReBe ReBe is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont get it to work. I tried to set for a test in the "vbulletin settings"-->"server settings and optimization optins" the option "deactivate chache for content" to "yes". So now should be the postcache off, right? But with my bbcode_quote template change
Code:
<img src="{vb:stylevar imgdir_misc}/quote_icon.png" alt="{vb:rawphrase quote}" />
{vb:rawphrase originally_posted_by_x, {vb:raw username}}
repace with:
Code:
<img src="{vb:stylevar imgdir_misc}/quote_icon.png" alt="{vb:rawphrase quote}" />
<vb:if condition="$show['member']">{vb:rawphrase originally_posted_by_x, {vb:raw username}}
<vb:else />
<span style="font-weight:bold; font-size:10pt">{vb:rawphrase quote}</span></vb:if>
it does not work. First it works, but after 1-2 hours i see more and more posting, where for example registered member dont see the usernames in quote tag.
Reply With Quote
  #15  
Old 12-25-2011, 05:42 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is $show a registered variable in that template?
Reply With Quote
  #16  
Old 12-25-2011, 09:37 PM
ReBe ReBe is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, in the original-template is the string "<vb:if condition="$show['username']">".

--------------- Added [DATE]1324857009[/DATE] at [TIME]1324857009[/TIME] ---------------
Reply With Quote
  #17  
Old 12-25-2011, 10:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But is $show[member] defined? You may want to try using is_member_of instead and see if that works.
Reply With Quote
  #18  
Old 12-27-2011, 05:40 PM
ReBe ReBe is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, that works. But it works only, if i set in the vbulletin settings the "livetime of chaching posts" to 0 days. Seems my plugin:
Code:
if($vbulletin->userinfo[usergroupid] == '1')
{
    $post_cachable = 0;
}
dont work. I try it with hook "global_bootstrap_init_start" and "showpost_start".

But anyway, how kh99 wrote, its better that posts with quotes are generally not be cached. So can this plugin with hook bbcode_parse_start work?

Code:
$parsedtext = '<img src="images/misc/quote_icon.png" alt="Quote" />'
{
    $post_cachable = 0;
}
You wrote, that i should write a plugin that looks for a string that starts with:
<img src="images/misc/quote_icon.png" alt="Quote" />
and ends with:
<img class="inlineimg" src="images/buttons/viewpost-right.png" alt="View Post" /></a>
How can i do this? Thanks for your help untill now and sorry for my probably stupid questions.
Reply With Quote
Reply

Thread Tools
Display Modes

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 10:29 AM.


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