Re: Help with bootstrap theme - navbar

Hi Steve,
the first code doesn't seem to include the search field declaration, so I'm not sure. My guess would be that the search field is declared first in the logged out portion of the site, and last in the logged-in portion of the theme.

Me on Ohloh

Topic


Help with bootstrap theme - navbar

I've been working on a new theme for a site based on icmsbootstrap3 and have the following tweak to make - the position of the search field changes after logging in and I'd like it to be the same as the logged out position.

Looking at theme.html, the button & dropdown are constructed differently.

Logged out (just uses a li and a b element):

<{if !$icms_isuser}> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"><{$smarty.const.THEME_PSEUDO}><b class="caret"></b></a> <ul class="dropdown-menu"> <form style="margin-left: 10px;margin-right: 10px;padding-bottom: 8px;padding-top: 8px;" action="<{$icms_url}>/user.php" method="post" class="form-signin navbar-left"> <input type="text" placeholder="<{$smarty.const.THEME_DESC_PSEUDO}>" class="form-control" name="uname" /> <input type="password" placeholder="<{$smarty.const.THEME_DESC_PASSWORD}>" class="form-control" name="pass" /> <{if $rememberme}> <input type="checkbox" name="rememberme" value="On" /><{$lang_rememberme}> <{/if}> <input type="hidden" name="icms_redirect" value="<{$icms_requesturi}>" /> <input type="hidden" name="op" value="login" /> <button class="btn btn-primary btn-block" type="submit"><{$smarty.const.THEME_PSEUDO}></button> </form> <li class="divider"></li> <li><a href="<{$icms_url}>/user.php#lost" title=""><span class="glyphicon glyphicon-warning-sign" style="padding-right:5px;"></span> Forgot your password?</a></li> <li><a href="<{$icms_url}>/register.php" title="<{$smarty.const.THEME_REGISTER}>"><span class="glyphicon glyphicon-user" style="padding-right:5px;"></span> <{$smarty.const.THEME_REGISTER}></a></li> </ul> </li> <{/if}>


Logged in (uses a div and a button element) :
<{if $icms_isuser}> <div class="btn-group" style="margin-left: 10px;margin-right: 10px;padding-bottom: 8px;padding-top: 8px;"> <a href="<{$icms_url}>/user.php" role="button" class="btn btn-default"><span class="glyphicon glyphicon-user" style="padding-right:5px;"></span> <{$icms_uname}></a> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="<{$icms_url}>/edituser.php"><span class="glyphicon glyphicon-pencil" style="padding-right:5px;"></span> Edit Profile</a></li> <li><a href="<{$icms_url}>/edituser.php?op=avatarform"><span class="glyphicon glyphicon-camera" style="padding-right:5px;"></span> My Avatar</a></li> <li><a href="<{$icms_url}>/notifications.php"><span class="glyphicon glyphicon-envelope" style="padding-right:5px;"></span> <{$smarty.const.THEME_NOTIFICATION}></a></li> <li><{xoInboxCount assign=pmcount}><{if $pmcount}><a href="<{xoAppUrl viewpmsg.php}>" title="<{$smarty.const.THEME_INBOX}> <{$pmcount}> <{$smarty.const.THEME_NOTREAD}>"><span class="glyphicon glyphicon-comment" style="padding-right:5px;"></span> <{$smarty.const.THEME_INBOX}> <span class="badge badge-info"><{$pmcount}></span></a><{else}><a href="<{xoAppUrl viewpmsg.php}>" title="<{$smarty.const.THEME_INBOX}>"><span class="glyphicon glyphicon-comment" style="padding-right:5px;"></span> <{$smarty.const.THEME_INBOX}></a><{/if}></li> <li class="divider"></li> <li><a href="<{$icms_url}>/admin.php"><span class="glyphicon glyphicon-wrench" style="padding-right:5px;"></span> <{$smarty.const.THEME_ADMIN}></a></li> <li><a href="<{$icms_url}>/user.php?op=logout"><span class="glyphicon glyphicon-off" style="padding-right:5px;"></span> <{$smarty.const.THEME_LOGOUT}></a></li> </ul> </div> <{/if}> <form style="margin-left: 10px;margin-right: 10px;padding-bottom: 8px;padding-top: 8px;" action="<{$icms_url}>/search.php" class="navbar-left"> <input type="text" placeholder="<{$smarty.const.THEME_SEARCH}>" class="form-control" name="query" /> <input type="hidden" name="action" value="results" /> </form> </ul> </div>


I'm sure I could figure it out, but there are others who would be able to do this much quicker than me.

Thanks!


Attach file:



png  icms-bootstrap3-nav-login.png (166.54 KB)
54__58225495ca0647c95.png 1155X192 px

png  icms-bootstrap3-nav-logged-in.png (167.94 KB)
54__163205495ca14360b8.png 1167X190 px

Steve Twitter: @skenow Facebook: Steve Kenow

Topic


Re: Smarty

  • 2014/8/13 14:00:11

The theme is basically the theme from our company, written by QM-B. I spent a lot of time today to figure out. The main problem was a lot of arrays, which can be created easily in smarty 3. Within the theme he has several arrays in a function, but associative arrays which cannot simple be created in pure smarty 2. So currently I am using the php tag, which allows me to build the array in PHP. Not a nice solution and it blows up the theme, but the most easiest way I found. If you have a better idea, I would be glad to hear.
Easier was the solution I found for tags like

<{$article['category']['title']}>

Quote:

we are currently still using Smarty 2, and as far as I know, nobody has been working on a migration to another theme engine (Smarty 3, Twig, ...).


Think, my answer is yours. QM-B seems to have figured out, since we are using Smarty 3 at work. There are several in-template functions, arrays and other stuff not supported in my current installation. Currently I think, my site would be faster back, if I would wait for QM-B to be back.

Topic


Re: Smarty

Hi Karl,
we are currently still using Smarty 2, and as far as I know, nobody has been working on a migration to another theme engine (Smarty 3, Twig, ...).
The difficulty of such a task is that ImpressCMS (and Xoops before it) are using some Smarty 2 functionalities as part of the base system, such as caching. Smarty is very much woven into the system, so it is a big task to untangle it.
Until now, there was no real demand for a change, as there is much improvement that can be made by simply using smarty in a smarter way
Mr.Theme's work for ImpressCMS 2.0 (and here) demonstrates that very nicely.

To get to your question : it depends on what specific Smarty 3 stuff you are using. If it's a theme that is described or available on the Internet, we could give a look into it and let you know. In most cases, themes don't use many specific smarty elements, so converting a HTML5/CSS theme to an ImpresssCMS theme shouldn't be too hard.

Me on Ohloh

Topic


Smarty

  • 2014/8/13 3:36:41

Not sure if the forum is the right one. I have some trouble with my templates and the "old" smarty inside. In the german forum Rene told me, that I have some custom Smarty features, which I can currently not use, since I haven't the plugin. Ok, I removed them. But in some Templates I still have troubles. After a long time of Google Searches, I found, that my Smarty is in Smarty 3, but not compatible with Smarty 2.
Now the question: Is there any way to re-enable Smarty 3 in Impress? Or would it be faster to use a new theme?

Cheers, Karl

Topic


Re: Remove theme css from a single page

I wonder if that would be useful in combination with symlinks, extending what you can do with symlinks that way

Me on Ohloh

Topic


Re: Remove theme css from a single page

  • 2014/4/9 17:02:03
  • lotus

;)

this works in both directions, of course. You can make it like
if (*smarty* != *sitename) than make *yourstandard.css*

Webdesign: http://netzstrand.de
Topic


Re: Remove theme css from a single page

Hi Chris,
that's nice Smarty template kung-fu there. I hadn't thought of it that way, very nice.

Thanks for sharing!

Me on Ohloh

Topic


Re: Remove theme css from a single page

Hi there,
try this:

<{if $smarty.server.REQUEST_URI=='/modules/XXXX'}> <link rel="stylesheet" href="<{xoImgUrl css/style.css}>" type="text/css" media="screen" charset="utf-8" /><{/if}>


in this example "/modules/XXXX" stands for your URI - the part after your domain. So you have to adjust it.

If you work with symlinks like index.php?fct=sitename* you can also use:
<{if $smarty.get.fct == 'sitename*'}><link rel="stylesheet" href="<{xoImgUrl css/style.css}>" type="text/css" media="screen" charset="utf-8" /><{/if}>


best Greetings,
Chris

Webdesign: http://netzstrand.de
Topic


Remove theme css from a single page

I have a single page I want to display in an I frame but I need it to have it's own style, not the global style. Is there an easy way to do this?

Topic


Re: Anybody got the Belius theme...

Great news! Very useful fetaure

Topic


Re: Anybody got the Belius theme...

  • 2013/4/4 15:19:31
  • david

Useful to know - specially if wanting to do a quick test on branches!

Thanks for that update!

Topic


Re: Anybody got the Belius theme...

Resurrecting an old thread, I know, but I just wanted to mention that it is now possible to download a specific folder from the source code repositories from within assembla.

When browsing the SVN repository (and the Git repository, it works on both), on the top-right, you'll see the link 'download'. When you click that, Assembla prepares an archive with the contents of that folder for that revision.

Me on Ohloh

Topic


Re: problems with smartbizz theme

  • 2012/11/19 14:18:07
  • QM-B

Ok.. I'm glad that it is solved

Topic


Re: problems with smartbizz theme

  • 2012/11/19 14:08:39
  • web-M

Wow now it is working!!

I overlooked page_...

Thanks for your help

web-M Personal website

Topic


Re: problems with smartbizz theme

  • 2012/11/19 13:50:34
  • QM-B

Sorry, don't know the theme yet.. never checked.. Just had a quick look for the code. In theme html I found on lines 68/69:

<{if $xoBlocks.page_slider}><{includeq file="$theme_name/slider.html"}><{/if}> <{if $xoBlocks.page_custom}><{includeq file="$theme_name/custom.html"}><{/if}>

So I'd expect looking for block positions page_slider and page_custom

Topic


Re: problems with smartbizz theme

  • 2012/11/19 13:25:01
  • web-M

OK but should the blocks work when I make two new blockpositions named slider and custom? Or should I do something else?

web-M Personal website

Topic


Re: problems with smartbizz theme

  • 2012/11/19 13:10:04
  • QM-B

No, he was talking about our included jQuery version. the current used jquery, jquery ui and colorbox need to be updated.. Currently I am doing the last tests to get sure it's working. Will update the libraries this night.
The last time I often found trouble in themes caused by the jquery version/colorbox version. Especially in IE..

Topic


Re: problems with smartbizz theme

  • 2012/11/19 13:05:51
  • web-M

You mean the latest version of ImpressCMS? I use 1.3.3 final.

web-M Personal website

Topic


Re: problems with smartbizz theme

@QM-B told me something about the jQuery library that would give issues with the themes, and that upgrading to the very latest should solve problems in certain cases.

Me on Ohloh

Topic



 Top