-
AuthorPosts
-
ukfraternite Friend
ukfraternite
- Join date:
- May 2008
- Posts:
- 294
- Downloads:
- 0
- Uploads:
- 44
- Thanks:
- 61
- Thanked:
- 10 times in 1 posts
December 16, 2009 at 1:28 am #146867Hello,
I would like my module titles to have this effect “Latest News“. Which is having the module title to show 2 colours. you can see it with the template Olivine (at the botom).
Now, I have done these changes with Teline and Vauxite. But with Seleni, the index.php file appears different from the other 2.
These are the steps I have followed:
<em>@scotty 111944 wrote:</em><blockquote>This is done with javascript.
BACKUP FIRST!Step one: Open templates/ja_teline_ii/js/ja.script.js and find…
function preloadImages () {
var imgs = new Array();
for (var i = 0; i < arguments.length; i++) {
var imgsrc = arguments;
imgs = new Image();
imgs.src = imgsrc;
}
}
On a new blank line after paste…//Add span to module title
function addSpanToTitle () {
//var colobj = document.getElementById ('ja-col');
//if (!colobj) return;
var modules = getElementsByClass ('module.*', null, "div");
if (!modules) return;
for (var i = 0; i<modules.length; i++) {
var module = modules;
var title = module.getElementsByTagName ("h3")[0];
if (title) {
text = title.innerHTML;
var pos = text.indexOf(' ');
if (pos!=-1) {
title.innerHTML = "<span>"+text.substr(0,pos)+"</span>"+text.substr(pos);
}else{
title.innerHTML = "<span>"+text+"</span>";
}
}
}
}
Step two: Open templates/ja_teline_ii/index.php and at the very end find…</body>
</html>
Change to…<script type="text/javascript">
addSpanToTitle();
</script>
</body></html>
Step three: Open templates/ja_teline_ii/css/template.css and find on line 792…/* HEADER
--------------------------------------------------------- */
and change to…div.moduletable h3 span,
div.moduletable_menu h3 span,
div.moduletable_text h3 span,
div.moduletable_hilite h3 span {
color: #A0522D;
}/* HEADER
--------------------------------------------------------- */
.</blockquote>The problem is with Seleni, once I get to step 2, I cannot find these:
</script></body>
How do get around this please?
mihirc Friendmihirc
- Join date:
- December 2008
- Posts:
- 597
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 62
- Thanked:
- 95 times in 39 posts
December 16, 2009 at 4:53 am #326696Hello,
It is just echoing of the javascript files. So you can put it in the end of the index.php file as well,and it wouldnt matter much.
Regards,
Mihir Chhatre.ukfraternite Friendukfraternite
- Join date:
- May 2008
- Posts:
- 294
- Downloads:
- 0
- Uploads:
- 44
- Thanks:
- 61
- Thanked:
- 10 times in 1 posts
December 16, 2009 at 7:22 pm #326753I have added the code at the end of the index.php and I got this response on the website:
/templates/ja_seleni/index.php on line 70
This is how the index.php looks like:
<?php
/*
# ------------------------------------------------------------------------
# JA Seleni - Stable version - Version 1.1 - Licence Owner JA117151
# ------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
# This file may not be redistributed in whole or significant part.
# ------------------------------------------------------------------------
*/// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );include_once (dirname(__FILE__).DS.'libs'.DS.'ja.template.helper.php');
if( defined('_DEMO_MODE_') ) {
$tmplTools = JATemplateHelper::getInstance($this, array('ui', JA_TOOL_SCREEN, JA_TOOL_MENU, JA_TOOL_COLOR, 'main_layout', 'direction'));
} else {
$tmplTools = JATemplateHelper::getInstance($this, array('ui', JA_TOOL_SCREEN, JA_TOOL_MENU, 'main_layout', 'direction'));
}//Calculate the width of template
$tmplWidth = '';
$tmplWrapMin = '100%';
switch ($tmplTools->getParam(JA_TOOL_SCREEN)){
case 'auto':
$tmplWidth = '97%';
break;
case 'fluid':
$tmplWidth = intval($tmplTools->getParam('ja_screen-fluid-fix-ja_screen_width'));
$tmplWidth = $tmplWidth ? $tmplWidth.'%' : '90%';
break;
case 'fix':
$tmplWidth = intval($tmplTools->getParam('ja_screen-fluid-fix-ja_screen_width'));
$tmplWrapMin = $tmplWidth ? ($tmplWidth+1).'px' : '771px';
$tmplWidth = $tmplWidth ? $tmplWidth.'px' : '770px';
break;
default:
$tmplWidth = intval($tmplTools->getParam(JA_TOOL_SCREEN));
$tmplWrapMin = $tmplWidth ? ($tmplWidth+1).'px' : '981px';
$tmplWidth = $tmplWidth ? $tmplWidth.'px' : '980px';
break;
}$tmplTools->setParam ('tmplWidth', $tmplWidth);
$tmplTools->setParam ('tmplWrapMin', $tmplWrapMin);//Main navigation
$ja_menutype = $tmplTools->getParam(JA_TOOL_MENU, 'css');
$jamenu = null;
if ($ja_menutype && $ja_menutype != 'none') {
$japarams = new JParameter('');
$japarams->set( 'menutype', $tmplTools->getParam('menutype', 'mainmenu') );
$japarams->set( 'menu_images_align', 'left' );
$japarams->set( 'menupath', $tmplTools->templateurl() .'/ja_menus');
$japarams->set('menu_images', 1); //0: not show image, 1: show image which set in menu item
$japarams->set('menu_background', 1); //0: image, 1: background
$japarams->set('mega-colwidth', 200); //Megamenu only: Default column width
$jamenu = $tmplTools->loadMenu($japarams, $ja_menutype);
}
//End for main navigation$layout = $tmplTools->getLayout ();
if ($layout) {
$tmplTools->display ($layout);
}
<script type="text/javascript">
addSpanToTitle();
</script>
</body></html>
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by ukfraternite 14 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum