Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About generaldarkness

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. generaldarkness

    Knowledgebase Social Sharing

    This will add the meta data for sharing Knowledgebase articles on Facebook and Twitter. It gets the article title, description and it selects the first image from the article if any to show on your social share post. I have separate meta data sections for different pages, this is just the knowledgebase section. Change the "yourdata" accordingly. Adjust as needed. <title>{if $catname}{$catname}{/if} - {if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title> <meta name="description" content="{$kbarticle.text|truncate:150|strip_tags}"> {if preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i',$kbarticle.text, $result)} <meta property="og:image" content="{$result[1]}" /> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:image" content="{$result[1]}"> {/if} <meta property="og:title" content="{if $catname}{$catname} -{/if} {if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}" /> <meta property="og:site_name" content="yourdata"/> <meta property="og:url" content="http://{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" /> <meta property="og:description" content="{$kbarticle.text|truncate:150|strip_tags:false}" /> <meta property="fb:app_id" content="yourdata" /> <meta name="twitter:site" content="@yourdata"> <meta name="twitter:creator" content="@yourdata"> <meta name="twitter:title" content="{if $catname}{$catname} -{/if} {if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}"> <meta name="twitter:description" content="{$kbarticle.text|truncate:150|strip_tags:false}">
  2. generaldarkness

    $kbcat.name knowledgebase Categories title

    That works for me
  3. generaldarkness

    $kbcat.name knowledgebase Categories title

    I have tried $kbcat.name and it doesn't display anything. I think you just have to use the normal title {$pagetitle} - {$companyname} This like the demo you linked to just shows knowledgebase and company name.
  4. generaldarkness

    Knowledgebase Description

    Thanks Brian, that's the ticket, works perfect. {$kbarticle.text|truncate:100|strip_tags}
  5. generaldarkness

    Knowledgebase Description

    Thanks for the reply. that was the article i got the tags from. But doesn't seem to work. I'm wondering if the $kbarticle.article has been changed in the latest version.
  6. generaldarkness

    Knowledgebase Description

    How can I get the text from a knowledgebase article for use with meta tags? I have tried {$kbcat.description} and {$kbarticle.article} but they just come out empty. $kbarticle.title works fine for title, but I want to truncate the actual article text to use in meta description.
  7. generaldarkness

    Nav Links

    Thanks Brian, It was a long day, I couldn't find the documentation for it. Thanks for the link.
  8. generaldarkness

    Sticky footer

    If you are using the latest theme with bootsrap you can add class="navbar-fixed-bottom"
  9. generaldarkness

    Nav Links

    Looking at the new bootstrap six template. I'm confused to where the nav and sidebar links are being fetched from. Header.tpl <section id="main-menu"> <nav id="nav" class="navbar navbar-default navbar-main" role="navigation"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Brand</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> {include file="$template/includes/navbar.tpl" navbar=$primaryNavbar} </ul> <ul class="nav navbar-nav navbar-right"> {include file="$template/includes/navbar.tpl" navbar=$secondaryNavbar} </ul> </div><!-- /.navbar-collapse --> The links seems to be collected from navbar.tpl But you can't edit the actual links navbar.tpl {foreach $navbar as $item} <li{if $item->hasChildren()} class="dropdown"{elseif $item->getClass()} class="{$item->getClass()}"{/if} id="{$item->getId()}"> <a {if $item->hasChildren()}class="dropdown-toggle" data-toggle="dropdown" href="#"{else}href="{$item->getUri()}"{/if}> {if $item->hasIcon()}<i class="{$item->getIcon()}"></i> {/if} {$item->getLabel()} {if $item->hasBadge()} <span class="badge">{$item->getBadge()}</span>{/if} {if $item->hasChildren()} <b class="caret"></b>{/if} </a> {if $item->hasChildren()} <ul class="dropdown-menu"> {foreach $item->getChildren() as $childItem} <li{if $childItem->getClass()} class="{$childItem->getClass()}"{/if} id="{$childItem->getId()}"> <a href="{$childItem->getUri()}"> {if $childItem->hasIcon()}<i class="{$childItem->getIcon()}"></i> {/if} {$childItem->getLabel()} {if $childItem->hasBadge()} <span class="badge">{$childItem->getBadge()}</span>{/if} </a> </li> {/foreach} </ul> {/if} </li> {/foreach} When this is loaded on a page it shows as <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li id="Primary_Navbar-Home"> <a href="index.php"> Home </a> </li> <li id="Primary_Navbar-Announcements"> <a href="announcements.php"> Announcements </a> </li> <li id="Primary_Navbar-Knowledgebase"> <a href="knowledgebase.php"> Knowledgebase </a> </li> <li id="Primary_Navbar-Network_Status"> <a href="serverstatus.php"> Network Status </a> </li> <li id="Primary_Navbar-Contact_Us"> <a href="contact.php"> Contact Us </a> </li> </ul> So where are the links to edit/add to? IE <li id="Primary_Navbar-Home"> <a href="index.php"> Home </a> </li> Maybe I'm missing something simple it's been a long day. I know I can obviously take the include out and add my own links to the section but it's annoying me. Thanks in advance.

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated