Not Solved PHP in Template!
#11
Not Solved
Well first of all, what is $cstyle, you have an if statment for something, what is that thing ($cstyle).

the code worked for me, i don't know where you have messed, so please send me your file

regards


Reply
#12
Not Solved
ok, i try to make the CS make that i Requast.
so the $cstyle is the number of the Categorys(manuely write this)
the if command i explian in the code
if($cstyle >= 3)
                    {
                    $csty = '<tr><td width="250px" valign="top"><strong><font color="#000080"><u>$forum[name]</u></font></strong>'.$forums.'</td></tr>'; /// make new line every 3 Categorys.
                    }
                else
                    {
                    $csty = '<td width="250px" valign="top"><strong><font color="#000080"><u>$forum[name]</u></font></strong>'.$forums.'</td>'; /// make only category without new line.
                    }
                    eval("\$forumlisting .= \"".$templates->get("forumbit_depth$depth$forumcat")."\";");
now i enter this to index.php but is doing new line every cat(and not every 3 cats). so i dont get what i want..
Best Regards, Oded Dwek
MyBB Hebrew Support Site | Hebrew Pack | My Forum
Hebrew Translator, and the owner of UserID 2000!.
Reply
#13
Not Solved
Well ofcourse, you declared the item as that then it would be as that, you would need to do something like this.
if($cstyle == 3) {
	$csty = '<tr><td width="250px" valign="top"><strong><font color="#000080"><u>'.$forum['name'].'</u></font></strong>'.$forums.'</td></tr>'; /// make new line every 3 Categorys.
} else {
	$csty = '<td width="250px" valign="top"><strong><font color="#000080"><u>'.$forum['name'].'</u></font></strong>'.$forums.'</td>'; /// make only category without new line.
}
$cstyle++;
if($cstyle == 3) $cstyle = 0;
Reply
#14
Not Solved
haa i understand, but i see, this check one time the nubmer of category one time only, so it do only new line or, do only without new line, so we need to put that in another place..
hope you understand me
Best Regards, Oded Dwek
MyBB Hebrew Support Site | Hebrew Pack | My Forum
Hebrew Translator, and the owner of UserID 2000!.
Reply
#15
Not Solved
nope, sorry I don't get that :/
Reply
#16
Not Solved
ok i understand again.
what the if Command we make doing(what this if command doing i mean) : check if CStyle >= 5 and if it right so : make all the Cat in new line, Else make all the Category in another line.
Best Regards, Oded Dwek
MyBB Hebrew Support Site | Hebrew Pack | My Forum
Hebrew Translator, and the owner of UserID 2000!.
Reply
#17
Not Solved
Hmm, I really do not understand you, I'm really sorry :/
This if should check if there is 3 categories between before an new line, isn't that what you wanted?
and you may wanna declare $cstyle = 0;over the while loop.
Reply
#18
Not Solved
i want that every 3 Category it make a new line. this is the right code for it?(now you have to understand)
Best Regards, Oded Dwek
MyBB Hebrew Support Site | Hebrew Pack | My Forum
Hebrew Translator, and the owner of UserID 2000!.
Reply
#19
Not Solved
Yes it is, it should make an new line after every 3end category.
Reply
#20
Not Solved
but this not does.. i have 5 Categorys and this is not work.
can you show me the full code and where to put it(all from 0) becasue maybe i do something wrong.
Best Regards, Oded Dwek
MyBB Hebrew Support Site | Hebrew Pack | My Forum
Hebrew Translator, and the owner of UserID 2000!.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)