Posts: 9
Threads: 2
Joined: Sep 2012
2012-09-04, 17:17:25
(This post was last modified: 2012-09-04, 17:19:04 by hhj.)
Hello guys. I need some help and I hope someone can help me with my stupid questions.
So , I use GetSimpleCms with the Elegant Theme from here http://get-simple.info/extend/theme/elegantblue/365/ .
I want to integrate in this theme a diferent menu, something like this http://www.dynamicdrive.com/dynamicindex1/gooeymenu.htm (First one with that blue button.)
In normal way, using Html and php without a CMS, I just have to use those instructions and everything would be great, but....uhm...Here it's not working.
I am a newbie and I dont even know how to start. Maybe someone could help me in any way? Thanks
I appreciate.
Posts: 1,108
Threads: 70
Joined: Aug 2009
Hi,
Create folder in your theme folder called 'gooeymenu'
Put all the files for gooeymenu in this folder.
gooeymenu.js
gooeymenu.css
and the 3 images required.
then add them to the <head> of your template file like so.
Code: <link href="<?php get_theme_url(); ?>/gooeymenu/gooeymenu.css" rel="stylesheet">
<script src="<?php get_theme_url(); ?>/gooeymenu/gooeymenu.js" type="text/javascript"></script>
the code examples on the dynamic drive site should work as provided then.
Posts: 9
Threads: 2
Joined: Sep 2012
Ok, first THANK YOU FOR YOUR REPLY I really appreciate your help. Second, Because I am a newbie I didn't made it work. No ideea why, but nothing changed.
I created the folder, I uploaded those 5 files, Added in template.php that 2 line code and..nothing happend.
I saw that the Menu has a diferent form on that website like
Code: <ul id="gooeymenu1" class="gelbuttonmenu">
<li><a href="*//*/">Home</a></li>
<li><a href="*//*/style/">CSS Codes</a></li>
<li><a href="*://*/forums/">Forums</a></li>
<li><a href="*://*">Tools</a></li>
<li><a href="*://*/" class="selected">JavaScript</a></li>
<li><a href="*:/*>CSS Gallery</a></li>
</ul>
<script>
gooeymenu.setup({id:'gooeymenu1', selectitem:1})
</script>
Should I add that too? Or.....?
Link to my test website. http://shop.clickitshop.ro/
Thanks again.
Posts: 1,108
Threads: 70
Joined: Aug 2009
Insert the code below instead of your menu code and it should work for you.
Code: <ul id="gooeymenu1" class="gelbuttonmenu">
<li class="current index"><a href="http://shop.clickitshop.ro/" title="Bun venit pe prima pagina !">Pagina de casa</a></li>
<li class="test"><a href="http://shop.clickitshop.ro/test/" title="PAgina 2">Pagina 2</a></li>
<li class="test-1"><a href="http://shop.clickitshop.ro/test-1/" title="Pagina 3">Pagina 3</a></li>
<li class="gallery"><a href="http://shop.clickitshop.ro/gallery/" title="Gallery">Galerie</a></li>
<li class="contact"><a href="http://shop.clickitshop.ro/contact/" title="Contact">Contact</a></li>
</ul>
<script>
gooeymenu.setup({id:'gooeymenu1', selectitem:1})
</script>
Posts: 1,108
Threads: 70
Joined: Aug 2009
ooops, sorry forgot you also need to include jquery in the <head> tag before your other scripts
Code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
Posts: 9
Threads: 2
Joined: Sep 2012
So in template I remove
Code: <div id="menu-wrapper">
<div id="menu">
<ul>
<?php get_navigation(return_page_slug()); ?>
</ul>
</div>
</div>
And transform to
Code: <div id="menu-wrapper">
<div id="menu">
<ul id="gooeymenu1" class="gelbuttonmenu">
<li class="current index"><a href="http://shop.clickitshop.ro/" title="Bun venit pe prima pagina !">Pagina de casa</a></li>
<li class="test"><a href="*shop.clickitshop.ro/test/" title="PAgina 2">Pagina 2</a></li>
<li class="test-1"><a href="*shop.clickitshop.ro/test-1/" title="Pagina 3">Pagina 3</a></li>
<li class="gallery"><a href="*shop.clickitshop.ro/gallery/" title="Gallery">Galerie</a></li>
<li class="contact"><a href=*shop.clickitshop.ro/contact/" title="Contact">Contact</a></li>
</ul>
<script>
gooeymenu.setup({id:'gooeymenu1', selectitem:1})
</script>
</div>
</div>
I removed the Http because I cant post more than 2 links. And Still after i did that...It don't work. Sorry if I am annoying.
Posts: 1,108
Threads: 70
Joined: Aug 2009
Just move the jquery line before the other 2, as below.
Code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<link href="http://shop.clickitshop.ro/theme/Elegantblue/gooeymenu/gooeymenu.css" rel="stylesheet">
<script src="http://shop.clickitshop.ro/theme/Elegantblue/gooeymenu/gooeymenu.js" type="text/javascript"></script>
and change your menu code to
Code: <div id="menu-wrapper">
<div id="menu">
<ul id="gooeymenu1" class="gelbuttonmenu">
<?php get_navigation(return_page_slug()); ?>
</ul>
</div>
</div>
<script>
gooeymenu.setup({id:'gooeymenu1'})
</script>
Posts: 1,108
Threads: 70
Joined: Aug 2009
Also because the Gooeymenu script is looking for a CSS class of selected to set the current menu item you'll need to copy the get_navigation function and change it to fix this.
Create a file 'functions.php' in your theme folder and paste the following into it.
Code: function my_get_navigation($currentpage) {
$menu = '';
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder');
if (count($pagesSorted) != 0) {
foreach ($pagesSorted as $page) {
$sel = ''; $classes = '';
$url_nav = $page['url'];
if ($page['menuStatus'] == 'Y') {
if ("$currentpage" == "$url_nav") { $classes = "selected ". $page['parent'] ." ". $url_nav; } else { $classes = trim($page['parent'] ." ". $url_nav); }
if ($page['menu'] == '') { $page['menu'] = $page['title']; }
if ($page['title'] == '') { $page['title'] = $page['menu']; }
$menu .= '<li class="'. $classes .'"><a href="'. find_url($page['url'],$page['parent']) . '" title="'. encode_quotes(cl($page['title'])) .'">'.strip_decode($page['menu']).'</a></li>'."\n";
}
}
}
echo exec_filter('menuitems',$menu);
}
then use this line instead on your menu:
Code: <?php my_get_navigation(return_page_slug()); ?>
Posts: 9
Threads: 2
Joined: Sep 2012
2012-09-04, 19:39:45
(This post was last modified: 2012-09-04, 19:40:13 by hhj.)
Wait..didn't saw your last edit Let me try please.
Posts: 1,108
Threads: 70
Joined: Aug 2009
another fix, change the jquery to 1.7 , think the il8n script need a higher version.
Code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
Posts: 1,108
Threads: 70
Joined: Aug 2009
on the functions.php file you need to include a <?php
at the very start.
were getting there !! 8)
Posts: 9
Threads: 2
Joined: Sep 2012
2012-09-04, 19:49:29
(This post was last modified: 2012-09-04, 20:01:16 by hhj.)
Code: <?php
function my_get_navigation($currentpage) {
$menu = '';
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder');
if (count($pagesSorted) != 0) {
foreach ($pagesSorted as $page) {
$sel = ''; $classes = '';
$url_nav = $page['url'];
if ($page['menuStatus'] == 'Y') {
if ("$currentpage" == "$url_nav") { $classes = "selected ". $page['parent'] ." ". $url_nav; } else { $classes = trim($page['parent'] ." ". $url_nav); }
if ($page['menu'] == '') { $page['menu'] = $page['title']; }
if ($page['title'] == '') { $page['title'] = $page['menu']; }
$menu .= '<li class="'. $classes .'"><a href="'. find_url($page['url'],$page['parent']) . '" title="'. encode_quotes(cl($page['title'])) .'">'.strip_decode($page['menu']).'</a></li>'."\n";
}
}
}
echo exec_filter('menuitems',$menu);
}
?>
Thats the function.php
I used a ?> at the end...It it wrong?
The menu in template
Code: <!-- end #header -->
<div id="menu-wrapper">
<div id="menu">
<ul id="gooeymenu1" class="gelbuttonmenu">
<?php my_get_navigation(return_page_slug()); ?>
</ul>
</div>
</div>
<script>
gooeymenu.setup({id:'gooeymenu1'})
</script>
<!-- end #menu -->
Still nothing.
Posts: 1,108
Threads: 70
Joined: Aug 2009
seems to be a conflict somewhere with the il8n plugin, can you disable and see if it works.
use Chrome (CTRL-SHIFT-I) or Firefox with firebug to see javascript errors when testing themes.
Posts: 9
Threads: 2
Joined: Sep 2012
n00dles101 Wrote:seems to be a conflict somewhere with the il8n plugin, can you disable and see if it works.
use Chrome (CTRL-SHIFT-I) or Firefox with firebug to see javascript errors when testing themes.
nothing...or nothing that i can figure about...
Would it be posible , if you have some free time, to have a look with www.teamviewer.com or something? Thanks
Posts: 1,108
Threads: 70
Joined: Aug 2009
Posts: 9
Threads: 2
Joined: Sep 2012
n00dles101 Wrote:sent you a PM Problem fixed. Thanks a lot for your help.
|