TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Javascript, AJAX, E4X (http://www.talkphp.com/javascript-ajax-e4x/)
-   -   Ajax Theme for CMS (http://www.talkphp.com/javascript-ajax-e4x/4770-ajax-theme-cms.html)

russellharrower 07-22-2009 11:22 AM

Ajax Theme for CMS
 
Hi I am currently testing my CMS, and making changes so that way template designers have more options and can make ajax themes.

demo - http://www.designvisa.com/index.php - ALL AJAX!

There are a few things I want to do, put cant figure out how.

I have a mod in mods/
That I want to show on the home page. (Tab1)
I want to do the following.

I need to send a request to another javascript

This is the code that gets the content.
Code:

function maincontent(tab)
    {
    document.getElementById("tab1").className = "";
    document.getElementById("tab2").className = "";
    document.getElementById("tab3").className = "";
    document.getElementById("tab"+tab).className = "current";
    callAjax('content.php?content= '+tab, 'content', '<center><img src="template/basic/images/ajax-loader.gif" title="Loading..."/></center>', 'Error');
    }

This is the code for the mods javascript

Let me explain how it works.
The user in the admin area tells the system that mod YouTube is to show on the home page
also known as Tab1.

I need to send a ajax request to the following to let it know if it is tab1 or tab3
Code:

function user1(tab)
    {
    callAjaxMods('mods.php?page= '+tab, 'content', '', '');
    }

I know it may not be the best javascript code to get Ajax working. But I need to be able to get information about what tab the user is on so that I can show or hide a div.

Thanks
Russell Harrower

Enfernikus 07-22-2009 01:43 PM

An all ajax theme is EXTREMELY bad for SEO.

Jim 07-22-2009 02:02 PM

I dont understand your question.

But i also recommend rewriting your frontend because - like Enfernikus said - a hell for search engines. And to honest it looks kind of cheap...

russellharrower 07-22-2009 02:31 PM

Quote:

Originally Posted by Jim (Post 27268)
I dont understand your question.

But i also recommend rewriting your frontend because - like Enfernikus said - a hell for search engines. And to honest it looks kind of cheap...

Hi guys and thanks for answering.
Just a quick not, we have not finished the design for our company design visa, I personally like the design which we hope to have out soon.

As for cheap (@Jim) well please let us finish the design first then comment.

This is what the site will look like once finished:
WEBSITE

We are aware that search engines do not like ajax, that is why when we are finished, you will see the following at the bottom of the site which are SEO friendly links to each page.

It will be up to each CMS admin if they want an Ajax site. Our CMS allows users to use the data in Flash, Ajax or just a normal SEO friendly site.

- Jim, thanks for saying that you don't understand the question. I'll try to ask the question.
I need to send the tab ID to the second javascript code posted on the first post.

I hope that helps...


Thanks


ModNote: IMG Tags deleted. URL Tags added - Please Resize the picture. Thank you.

russellharrower 07-22-2009 04:33 PM

We have also just fixed the SEO issue, as someone that has been working in SEO for over the past 10 years. This was something that I think maybe I should of included.

As search engines don't run Javascript this code should work
Code:

  <ul class="menu-nav" id="tabmenu">
    <li class="current" id="tab1" onclick="menu(1)"><a href="?do=home" onclick='iwant2("1");return false'><span>Home</span></a></li>
    <li class="" id="tab2" onclick="menu(2)"><a href="index.php?do=dosomething_noajax" onclick='iwant2("dosomething");return false'><span>Services</span></a></li>
  </ul>

This also fixes the mods data send information... YEAH if it was not for you Jim I would not of fixed my simple issue...

Thanks

EGYG33K 07-22-2009 08:44 PM

http://stilbuero.de/jquery/tabs/


All times are GMT. The time now is 05:16 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0