MyBB Community Forums

Full Version: Part of a message only visible for registered members
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2013-09-02, 06:45 PM)JimR Wrote: [ -> ]
(2013-09-02, 06:36 PM)Traxmix Wrote: [ -> ]I did not really understand, the only thing I do is seen as a text (between two tags, for example) is only visible to registered members.
After I plugins "In Php Templates" & "Template Conditionals."

Go through a plugin or code whatever ..

ok I see but $1 appears to be the wrong definiton
Yes I agree, I think the "$1" creates a bug with the first "$" in my code ..
(2013-09-02, 06:47 PM)Traxmix Wrote: [ -> ]
(2013-09-02, 06:45 PM)JimR Wrote: [ -> ]
(2013-09-02, 06:36 PM)Traxmix Wrote: [ -> ]I did not really understand, the only thing I do is seen as a text (between two tags, for example) is only visible to registered members.
After I plugins "In Php Templates" & "Template Conditionals."

Go through a plugin or code whatever ..

ok I see but $1 appears to be the wrong definiton
Yes I agree, I think the "$1" creates a bug with the first "$" in my code ..

I would guess that the templates conditional plugin does not have access to the $1 variable ... to test this out replace $1 with some text .... if the text displays fine the plugin can not see the mycode variable $1
What should I do? Or through a spoiler?
(2013-09-02, 07:10 PM)Traxmix Wrote: [ -> ]What should I do? Or through a spoiler?
have you replaced $1 with some text & does it work ?
(2013-09-02, 07:14 PM)JimR Wrote: [ -> ]
(2013-09-02, 07:10 PM)Traxmix Wrote: [ -> ]What should I do? Or through a spoiler?
have you replaced $1 with some text & does it work ?

No it does not work, this is the first "$" that crashes all. The "$" variable MyBB.
<if !in_array($mybb->usergroup['gid'], array('1')) then>$1</if>
The "$" to "$mybb->usergroup..."
(2013-09-02, 07:20 PM)Traxmix Wrote: [ -> ]
(2013-09-02, 07:14 PM)JimR Wrote: [ -> ]
(2013-09-02, 07:10 PM)Traxmix Wrote: [ -> ]What should I do? Or through a spoiler?
have you replaced $1 with some text & does it work ?

No it does not work, this is the first "$" that crashes all. The "$" variable MyBB.
<if !in_array($mybb->usergroup['gid'], array('1')) then>$1</if>
The "$" to "$mybb->usergroup..."

replace $1 with 'this works' there should just pure text and no $ with in the mycode definition and see if that works
But I am obliged to leave the first "$" because it belongs to the variable MyBB, without it its not working .. And he even makes any buger my code: (
(2013-09-02, 07:36 PM)Traxmix Wrote: [ -> ]But I am obliged to leave the first "$" because it belongs to the variable MyBB, without it its not working .. And he even makes any buger my code: (

you miss the point if the mycode works with pure text and not a variable there is a problem with the templates conditional plugin picking up a variable within a mycode statement
something starting with a $ indicates a variable hence the test to see if text is displayed with in the mycode statement
I understand anything .. I recall that I would like a piece of text is displayed only to a certain group .. So the variable MyBB is essential.
And the following code can not be changed.
<if !in_array($mybb->usergroup['gid'], array('1')) then>$1</if> 
(2013-09-02, 07:10 PM)Traxmix Wrote: [ -> ]What should I do? Or through a spoiler?

without knowing if the plugin is at fault or your mycode statement difficult to answer ... but you could use a spoiler but this may not allow dynamic content
Pages: 1 2 3