TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-22-2009, 11:22 AM   #1 (permalink)
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Smile 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
russellharrower is offline  
Reply With Quote
Old 07-22-2009, 01:43 PM   #2 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

An all ajax theme is EXTREMELY bad for SEO.
__________________
My Blog
Enfernikus is offline  
Reply With Quote
The Following User Says Thank You to Enfernikus For This Useful Post:
russellharrower (07-22-2009)
Old 07-22-2009, 02:02 PM   #3 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

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...
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
The Following User Says Thank You to Jim For This Useful Post:
russellharrower (07-22-2009)
Old 07-22-2009, 02:31 PM   #4 (permalink)
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Default

Quote:
Originally Posted by Jim View Post
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.

Last edited by codefreek : 07-22-2009 at 04:08 PM. Reason: ModNote: IMG Tags deleted. URL Tags added - Please Resize the picture. Thank you.
russellharrower is offline  
Reply With Quote
Old 07-22-2009, 04:33 PM   #5 (permalink)
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Default

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
russellharrower is offline  
Reply With Quote
Old 07-22-2009, 08:44 PM   #6 (permalink)
The Wanderer
 
EGYG33K's Avatar
 
Join Date: Jul 2009
Posts: 5
Thanks: 0
EGYG33K is on a distinguished road
Default

http://stilbuero.de/jquery/tabs/
EGYG33K is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wordpress AJAX Comments Spy Haris Script Giveaway 9 03-30-2013 07:54 AM
AJAX Help CoryMathews Javascript, AJAX, E4X 9 02-25-2008 05:10 AM
Ajax without ruining crawlability? Aaron Javascript, AJAX, E4X 5 01-28-2008 06:57 PM
Ajax & Creating Thumbnail Rendair Advanced PHP Programming 0 01-10-2008 03:28 PM
Secure AJAX Server Scripts trmbne2000 General 4 12-07-2007 01:14 AM


All times are GMT. The time now is 08:05 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design