vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   php plugin (https://vborg.vbsupport.ru/showthread.php?t=227200)

Ghostt 11-01-2009 04:58 PM

php plugin
 
how to include this php code to vbulletin ? i think wirh plugin and Global start but inst working like that. this script should only be at the showthread.php


function: if the user is logged in.
That special link is disepearing from all post.
PHP Code:

<if condition="$bbuserinfo['userid']">

function 
callback($buffer)
{

  return (
str_replace("http://example.com"""$buffer));
}

ob_start("callback");
<else />
</if> 


Ghostt 11-03-2009 09:02 PM

need help here!

Zachery 11-03-2009 09:04 PM

You couldn't do that in global start I don't believe. You just dont want links to work at all?

Ghostt 11-04-2009 09:34 AM

Quote:

Originally Posted by Zachery (Post 1909956)
You couldn't do that in global start I don't believe. You just dont want links to work at all?

no only a special link should disappear if the user logged in

Ghostt 11-05-2009 10:12 AM

`no ideas?

Ghostt 11-06-2009 12:53 PM

need help -.-

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

help me Oo?

Zachery 11-08-2009 12:00 PM

if(THIS_SCRIPT == showthread)
{
your code here
}

Ghostt 11-09-2009 03:56 PM

with global start or what?

like that?
PHP Code:

if(THIS_SCRIPT == showthread)
{
<if 
condition="$bbuserinfo['userid']">

function 
callback($buffer)
{

  return (
str_replace("http://example.com"""$buffer));
}

ob_start("callback");
<else />
</if>  



Lynne 11-09-2009 04:20 PM

You are using template conditions in a plugin and that is not going to work. Plugins must only use php. Instead of:
PHP Code:

<if condition="$bbuserinfo['userid']">

stuff
<else />
</if> 

You want:
PHP Code:

if ($vbulletin->userinfo['userid']) {

stuff



Ghostt 11-09-2009 04:34 PM

ah ok, then like that? (what about the </else> ) Oo

if(THIS_SCRIPT == showthread)
{

if ($vbulletin->userinfo['userid']) {

function callback($buffer)
{

return (str_replace("http://example.com", "", $buffer));
}

ob_start("callback");
{else /}
}

}


All times are GMT. The time now is 08:23 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.01171 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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