PDA

View Full Version : Using <br />'s only in <if>'s


King Justice
02-17-2007, 11:41 PM
Hi.

I'm trying to use <br />'s only in <if>'s but even if the PHP code inside the <if> isn't showing, the <br />'s still show.

Look:
www.egamingsupply.com/forum/

It shows the <br />'s empty. It shouldn't, because those spaces are used for forums, threads, and posts as seen here:
http://www.egamingsupply.com/forum/forumdisplay.php?f=2

Please assist.

Aken
02-17-2007, 11:47 PM
We can't see what you're referencing in the forumdisplay.php without registering. Please provide a test account if you want people to see.

And if you could be more specific about what you're trying to do where, it'd be easier to help. Personally I have no idea what you're trying to accomplish, who the IF statements are directed for, etc etc.

Smoothie
02-17-2007, 11:54 PM
put the <br /> inside the <if> statement

King Justice
02-18-2007, 12:54 AM
put the <br /> inside the <if> statement
There's an </else> statement that I think is making the <br />'s show up but without it the $navbar[breadcrumb] template doesn't show...

I don't know why!

Kungfu
02-18-2007, 01:54 AM
can you paste the code you are referring to in question.

Paste the entire thing from <if to </if>

King Justice
03-04-2007, 12:52 AM
Okay here is the code, someone please make me a new copy that is fixed.

<if condition="is_array($navbits)">
<span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1" title="$vboptions[bbtitle]"><strong>eGaming Supply Marketplace</strong></a> </span></if>
<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'">
<else />$navbits[breadcrumb]
<br />
<br />
<div id="title_of_post"><a href="$scriptpath" title="$navbits[lastelement]">$navbits[lastelement]</a></div>
<br />
<br />
</if>

thincom2000
03-04-2007, 02:18 AM
That is pretty messed up. What were you trying to do in the first place (before it got all messed)?

You don't have the lastelement there or the index.php one, which would be why it's completely blank on your forumhome.

SkyCatcher
03-05-2007, 02:52 PM
Okay here is the code, someone please make me a new copy that is fixed.

<if condition="is_array($navbits)">
<span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1" title="$vboptions[bbtitle]"><strong>eGaming Supply Marketplace</strong></a> </span></if>
<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'">
<else />$navbits[breadcrumb]
<br />
<br />
<div id="title_of_post"><a href="$scriptpath" title="$navbits[lastelement]">$navbits[lastelement]</a></div>
<br />
<br />
</if>

I don't know what you're trying to do but your <if> logic is off.



<if condition="is_array($navbits)">
<span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1" title="$vboptions"><strong>eGaming Supply Marketplace</strong></a> </span>
</if>

<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'">

[b]What is supposed to be here??

<else />

$navbits[breadcrumb]
<br />
<br />
<div id="title_of_post"><a href="$scriptpath"title="$navbits[lastelement]">$navbits[lastelement]</a></div>
<br />
<br />

</if>




So if a $_POST request is issued... it does nothing.... if no request is issued it makes a bunch of breaks and a <div> ...

What exactly are you editing?

King Justice
03-05-2007, 05:50 PM
I don't know what you're trying to do but your <if> logic is off.



<if condition="is_array($navbits)">
<span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1" title="$vboptions"><strong>eGaming Supply Marketplace</strong></a> </span>
</if>

<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'">

[b]What is supposed to be here??

<else />

$navbits[breadcrumb]
<br />
<br />
<div id="title_of_post"><a href="$scriptpath"title="$navbits[lastelement]">$navbits[lastelement]</a></div>
<br />
<br />

</if>




So if a $_POST request is issued... it does nothing.... if no request is issued it makes a bunch of breaks and a <div> ...

What exactly are you editing?
I'm trying to do this...notice on my main forum index there's a big gap:
www.egamingsupply.com/forum/

But when you're in a forum, thread, or post, the gap is filled up:
http://egamingsupply.com/forum/showthread.php?p=1283#post1283

I'm trying to have no gap in the forum index page. Help? :confused:

HMBeaty
03-05-2007, 06:13 PM
We have to register to see the posts, threads, etc

SkyCatcher
03-05-2007, 06:47 PM
I'm trying to do this...notice on my main forum index there's a big gap:
www.egamingsupply.com/forum/

But when you're in a forum, thread, or post, the gap is filled up:
http://egamingsupply.com/forum/showthread.php?p=1283#post1283

I'm trying to have no gap in the forum index page. Help? :confused:

Ok well that gap there is either at the bottom of the navbar template or the top of the forumhome template.

Take out any <br /> tags you've added and the gaps should go away. If worse comes to worse, just SAVE your templates (forumhome and navbar) and then revert the two or look at the original copy to see what's goofed up.

I must say that the code you posted above makes no sense though so it would probably be best to view the original template and compare the changes before doing anything else.