Thread Rating:
  • 8 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Condition and vbnavbar for 1.4.14
#31
flick how do i change the backround color of the rectangle where my logo is
Coming soon..
Reply
#32
(02-05-2009, 04:08 AM)indigored Wrote: flick how do i change the backround color of the rectangle where my logo is
If you show me a screenshot, I might be able to help you.
Reply
#33
ya, heres a screenshot:


   
Coming soon..
Reply
#34
(02-05-2009, 01:33 AM)flick Wrote: @Luke Beale: Thanks for your feedback. With regards to the drop down, there seems to be a small problem directly copying-pasting sometimes from the code provided on the Forums to the template editor, which results in random blank spaces that affect the dropdown menu.

Would it be possible to try pasting the code into a text editor first before copying it into the template editor please?

As for the other question: I believe this is the correct solution (see original post) which I'll write here as well for future reference:

Quote:If anyone has had issues with the 'if condition' not working (where even guests can see the "Private messages" and a string of nonsense) - with (complete) reference to this thread:

Open inc/class_templates.php
and find (around Line 101 in the latest version)
$template = str_replace("\\'", "'", $db->escape_string($template));

and add below
$template= str_replace("<if condition=","\".iif(",$template);
$template= str_replace("<then>",",\"",$template);
$template= str_replace("<else />","\",\"",$template);
$template= str_replace("</if>","\").\"",$template);

So no major template changes, thankfully! Smile

Thanks Big Grin


As you can be below it removes the header and menus when added those str_replace to that fille.

   

Also it shows the user login area when a member is logged in... how do I stop it from doing that?
Reply
#35
@Luke Beale: I guess I should have checked the code again (with the latest version) to make sure it was up to date with MyBB 1.4.x Wink My bad there as it was already available as a download (see below) and I forgot :p.

Try this instead: (will update the instructions on the other post too)

Quote:Find
$template = str_replace("\\'", "'", addslashes($template));


in inc/class_templates.php (around Line 114) and replace with

$template = str_replace("\\'", "'", addslashes($template));
$template= str_replace("<if condition=","\".iif(",$template);
$template= str_replace("<then>",",\"",$template);
$template= str_replace("<else />","\",\"",$template);
$template= str_replace("</if>","\").\"",$template);

p/s:Having just remembered that class_templates.php is already available as a download (from the first post) is it possible to find out if this file was downloaded and used to overwrite the default file on your forum?
(02-05-2009, 05:42 AM)indigored Wrote: ya, heres a screenshot:

@TomL: Thanks for the help Smile

@indigored: This is one thing I should probably point out from the inherited header. The template section that you want to look at is Header Templates/header and the specific code part is:
<div class="logo" style="background:#fff url('$theme[imgdir]/logobg.gif');">

It is (hopefully) quite self explanatory, and this is essentially the beginning of the the div (or box) where your logo sits. The default white colour of the header is set by
background: #fff
so any colour changes should be made here.

For instance, a black background would have the value
background: #000
Current motto: Cross referencing threads by providing links is a good idea!
Back-on Online - Back-on Fansite
http://www.backon-online.com/

WordPress Snippets
http://www.wpsnippets.com/
Reply
#36
alright i got it, thanks man
Coming soon..
Reply
#37
how do I show a table for guests only ?


I mean how do I use condition "if" "else" condition here ?
Reply
#38
You'd need to do an if condition and check $mybb->user['uid'] == 0, but inside an if thing. Something like this, but replacing if( with however it's done.
if($mybb->user['uid'] == 0)
{
// Your table for guests only.
}
Reply
#39
Appreciate the info buddy Smile
Reply
#40
It still doesn't seem to want to work Sad

Tried replacing the file and making the code changes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)