Jump to content

Knowledgebase suggestions: Styling options?


eirca

Recommended Posts

This features seems like a superb introduction, but currently does not apopear to have any styling or customization capability.

 

The default of an article.gif image file followed by the title and a tiny bit of intro text just doesn't fit with any of our customizations, and there appears to be nowhere we can, at the very least, even remove the image call (we use very few images in our templates)

 

We'd also like to be able to limit the number of suggestions to 3.

 

Please advise

Link to comment
Share on other sites

One more thing: I hate forcing clients to open additional windows in their browser, it's simply not needed. Can we have an option to at least define how the link is handled? It seems a bit presumptuous to simply open an additional window, and definitely not needed.

Link to comment
Share on other sites

I'm also wanting to style these a little but as eirca says, there doesn't seem to be a way as the search results just have a div id="searchresults" and I cannot find a reference to this div anywhere.

 

Can anyone help?

Link to comment
Share on other sites

It's part of the submitticket-steptwo.tpl template file

 

Matt

Where, specifically? I don't find any reference to the styling portion in the file. I see the javascript call but it includes no ability to change the link target or apply some styling to the parsing of the title and 'blurb' of the knowledgebase article.

 

 

Simon

Link to comment
Share on other sites

I'd keep it opening a new link to be honest, if a client didn't find what they wanted they can close the window and go back to what they've already written instead of having to go back and start again.

That's your opinion, based on your designing/coding practices. Ours differs from yours, evidently, and I would love to see a choice of 'new window' or 'self/parent'.

Link to comment
Share on other sites

  • WHMCS CEO

You'll need to use some Javascript string replace functions to alter the generated code as you want. But I would agree with Daniel, what you're suggesting means if what the user selects doesn't answer they're requestion, they've lost that message and won't be happy about it.

 

Matt

Link to comment
Share on other sites

You'll need to use some Javascript string replace functions to alter the generated code as you want.

Where, exactly? There is barely any code there, and definitely no href tags, no image tag, etc.

 

what you're suggesting means if what the user selects doesn't answer they're requestion, they've lost that message and won't be happy about it.

A quick message about "CTRL + Click" will suffice for those who specifically want a new window, we already have the mechanism to do that.

 

What file does 'getticketsuggestions' reference for parsing the link and 'blurb'? We could modify that to wrap a html tag in and around it but that's going to come out with multiple links due to the apparent hard coding of how it's parsed.

 

 

Simon

Link to comment
Share on other sites

Here's what I have been told we need to concentrate on right now: removing article.gif

 

How do I go about getting that out of the html that gets parsed? It's clearly in an encrypted file somewhere as even the source of a generated page does not show the placement. This is the main thing, we can't send the suggestions function live looking like that.

Link to comment
Share on other sites

Three files:

1) knowledgebase.tpl

2) knowledgebasecat.tpl

3) knowledgebasearticle.tpl

 

  1. Styles the initial appearance of the Knowledgebase and provides plenty of options for styling. As well as the removal of the .gif
  2. Here you can style the Search Results. This also serves as the article and sub-category view. Presently, the logic and html are nearly identical in both 1 and 2. When I overhauled my KB, I kept this approach of a similar look-and-feel, but added the Search box on the #2 for the user to perform additional searches. Gifs can be removed/changed here too.
  3. Here you can style the article view

 

There is not much existing styling in the style.css, but the structure lends itself well to being overhauled.

Link to comment
Share on other sites

It's actually the "knowledgebase suggestions" function that the question is about; I know the tpl's are editable for the knowledgebase its self, we've already overhauled the knowledgebase section (http://live.eirca.net/clients/knowledgebase.php)

 

THe Knowledgebase suggestions are taken from the knowledgebase.php and template files so if you change the icon there (article.gif) it will change in the suggestions for example as well.

Link to comment
Share on other sites

Do you have a live example of that? Removing article.gif from knowledgebase.tpl and knowledgebasecat.tpl doesn't appear to make a difference.

 

The parsing on the two is also different. There's no line break in the 'suggestions', so I would be surprised if that's how it is being parsed.

 

The knowledgebase.tpl code:

 

<strong>{$kbarticle.title}</a></strong><br />

{$kbarticle.article|truncate:80:"..."}

 

The way the suggestions are parsing is more like:

 

<strong> {$kbarticle.title}</a></strong> - {$kbarticle.article|truncate:XX:"....."}

 

There's quite a difference in the two (or three, however you look at it). Unfortunately, the suggestions parse no actual code in to the source, so it's impossible to get a reference point.

Link to comment
Share on other sites

i will try to explain

 

article.gif , the name is hard coded in the knowledgebase.php and you can not delete it , if you want to to change it just make a new file and make it transparent and call it article.gif and it will not appear on the suggestions .

if you still want to use the icon in the knowledgebase then just rename article.gif to article2.gif in the templates, so article.gif will show in the suggestion (TRANSPARENT) and article2.gif will show only in the knowledgebase .

 

i hope its clear !

Link to comment
Share on other sites

I see what you are saying with the icon joe but you still cannot change the "style" of the knowledgebase suggestions. Changing the knowledgebase style does not make a difference to the knowledgebase suggestions as my knowledgebase has been styled differently yet the suggestions stay the same.

Link to comment
Share on other sites

I see what you are saying with the icon joe but you still cannot change the "style" of the knowledgebase suggestions. Changing the knowledgebase style does not make a difference to the knowledgebase suggestions as my knowledgebase has been styled differently yet the suggestions stay the same.

of course you can , here an example for you

 

 

{literal}
<style type="text/css">
#searchresults a { background-color:#FFFF00; font-family: Tahoma; font-size: 14px; color: #FF0000;}
</style>
{/literal}

put the above code just before (supportticketsubmit-steptwo.tpl)

 

<div id="searchresults"></div>

this is just an example , and you can change anything there

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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