MyBB Community Forums

Full Version: PHP in Templates and Template Conditionals
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
How to remove breadcrumb from a specific forum?
^ what is your forum url ? have you installed template conditionals / php in templates plugin ?
for which forum section you do not want to display the breadcrumb navigation ?
(2017-04-13, 10:38 AM).m. Wrote: [ -> ]^ what is your forum url ? have you installed template conditionals / php in templates plugin ?
for which forum section you do not want to display the breadcrumb navigation ?

My forum is actually on localhost, here an example:

MyForums:
 1) Welcome!
      Rules
      ecc...
 2) Support.
     Rules

      ecc...
 3) Gaming
      Rules

      ecc...
 4) Test
      Rules

      ecc...
What i need to do is hide the breadcrumb when a user browse the forum test and his threads.
Awesome plugin, I'm trying to combine it with your xThreads plugin and having some problems though.

I'm trying to call the $db from a custom thread field to get the username of the parent account creating the post, since the account switcher plugin I use only gives me the UID of the parent account.

Here is what I'm putting in the Blank Replacement Value:

<?php
define("IN_MYBB", 1);
require_once "./global.php";
global $mybb, $db;
if($mybb->user['as_uid']){
$query = $db->query("SELECT * FROM mybb_users WHERE uid='". $mybb->user['as_uid'] ."'");
}elseif($mybb->user['as_share']){
$query = $db->query("SELECT * FROM mybb_users WHERE uid='". $mybb->user['as_shareuid'] ."'");
}
$qresult = $db->fetch_array($query);
return $qresult['username'];
?>
The error I get is that I can't get admin/index.php from that point... which doesn't really makes sense...
I want to display all of usergroups in showgroups.php

Quote:<if $GLOBALS['mybb']->user['usergroup'] == 8,9,10,11,12,13,14 then><else>
    <div class="usergroups-col">
        <div class="usergroups-row">
            <div class="table-wrap">
                <div class="table-cell-top">
                    <div class="usergroups-info">
                        <div class="usergroups-title">{$displaygroup['title']}</div>
                        <span class="smalltext">{$displaygroup['description']}</span>
                    </div>
                    Owner: {$displaygroup['admin']}<br>
                    {$displaygroup['number']} • <a href="usercp.php?action=usergroups&amp;joingroup=8&my_post_key={$mybb->post_code}">Click to join</a>
                </div>
                <div class="table-cell-top usergroups-userbar">
                    {$displaygroup['image']}
                </div>
            </div>
        </div>
    </div>
</if>
why that codes didn't work ? I know {$displaygroup['title,description,admin,number,image']} can't Show but I want real codes for displaying usergroups.
help me please.
Is the plugin removed? I can't find it anywhere but I see lots of old references to it.
Is this thread still active? If i activate conditionals then all of my threads open up blank page. IF i deactivate they open up as they should.
^ your related thread received replies.
Please how do i show ads by specific forum id?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22