61
jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
  • 2007/9/21 19:55

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


I just wanted to add on to this thread that I have seen a significant, positive change in my search engine results for pages in which I have used this new "blank module". Search engines really do like those page titles, keywords and page description tags...

jeffgr


www.XoopsExperts.com



62
jeffgr
Re: Upcoming Tutorials
  • 2007/9/17 14:36

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Yes, these are great, thank you! Keep em coming. I'm sure these will result in a new generation of module developers coming about. They are most helpful to me in my own work.



63
jeffgr
Re: Soft launch of XoopsExperts.com
  • 2007/9/12 23:08

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


That's supposed to be "artistic"! :)

But good point...maybe I will change the header slightly because of that!

jeffgr



64
jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
  • 2007/9/12 19:55

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


I have zipped up my version of the PageWrap module for you to download here:

http://xoopsexperts.com/modules/downloads/

My version of this module contains the code discussed in this thread, which will allow you to give the a unique page title, meta keywords, and meta description tag to the index.php file of this blank module. This will help you get the content that you put in this module to rank well with search engines.

I have also commented the code a bit more as well.

I renamed the module version 2.0 as well.

I added your name, Bandit-X, to the credits, hope you don't mind. :)

Enjoy!

jeffgr



65
jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
  • 2007/9/12 16:39

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Yes, this worked, thanks!

So...this is the code that I am now using in my index.php file:

<?php
if (file_exists("mainfile.php")) {
include(
"mainfile.php");
} elseif (
file_exists("../mainfile.php")) {
include(
"../mainfile.php");
} else { 
include(
"../../mainfile.php");
}
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsTpl->assign'xoops_showrblock'1); // 1 = With right block - 0 = Without right block
$xoopsTpl->assign'xoops_showlblock'0); // 1 = With left block - 0 = Without left block
?>

HTML CONTENT GOES HERE

<?php

if(isset($xoTheme) && is_object($xoTheme)) {
   
$xoTheme->addMeta'meta''keywords'"keyword, keyword, keyword, keyword");
   
$xoTheme->addMeta'meta''description'"This is the page description");
$xoopsTpl->assign('xoops_sitename','This is the page title');
   
}
include(
XOOPS_ROOT_PATH."/footer.php");
?>


Thanks again

jeffgr



66
jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
  • 2007/9/12 14:44

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


That works to change the meta keywords & description, thanks!

Bu what about the page title tag? At the moment, I have this code, which I am including in the blank module index page:

$xoopsTpl->assign('xoops_pagetitle', 'this is my page title');

This seems to add on the "this is my page title AFTER the default XOOPS site-wide page title.

But how might I remove the site-wide page title from showing, so that I only see the custom title that I add for this page

(which will give better SEO results)

Thanks,

jeffgr



67
jeffgr
Soft launch of XoopsExperts.com
  • 2007/9/12 13:11

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Hi everyone,

I have launched
www.XoopsExperts.com, a web site where you can post your Xoops-related projects, and advertise any Xoops-related services that you may have to offer.

The site still has a few kinks to work out, so I would appreciate it if you let me know of any improvements to be made. :)

If you have a special expertise in XOOPS themes, modules, templates, or SEO for Xoops-based sites, you can enter your free listing in the Expert Directory.

If you are looking for paid help with any aspect of your XOOPS site, you can post a free help wanted ad, specifying your exact project requirements and project budget. There is no minimum project budget required to post an ad.

It's completely free to use this site. There are also a few advertising spaces, where your link will be prominently featured, that are available for small fee.

Please read the About Pricing section before describing your XOOPS services. Explicit pricing (giving an exact price for a service) is not allowed on this site, for reasons that I explain on that page.

There is also a section which I hope will be useful for both XOOPS experts and Clients, called Consulting Advice

More features will be added to the site shortly as well. My hope is that this site will become a useful resource for those looking for paid XOOPS help, and for XOOPS Experts who want to advertise their services.

Cheers,

jeffgr



68
jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
  • 2007/9/12 12:54

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Admins - Please remove the three posts above, they are obviously spam (to drop links to his sites!).

Othere then that...does anyone have any ideas on how to do this? Adding in these three meta tags to this blank module would REALLY help with the SEO of the module that you are making. I can think of a way to do this, whereby you would refer to a header.php file that is contained within the module....but I have a feeling that this isn't the most effective way to accomplish this task! Any other ideas?



69
jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
  • 2007/9/11 18:01

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Hi martyboy,

I did try that actually...adding in the meta tags to the HTMl information that that goes in the middle of the PageWrap script. And you can indeed see these tags when you look at the source code of the page. However, I don't think that search engines are actually reading these tags as "the" meta tags that apply to that page...as they aren't the meta tags that are applied by the header.php file.

If you look at the source code of:

http://xoopsexperts.com/modules/about/

You will see that there are two instances of the meta tags...the first ones, at the top, are the site-wide tags. You can see further down in the code the meta tags that I inserted into the HTML content. However, I think that this second set of meta tags is disregarded by search engines. It doesn't seem to be the tags that the search engine is using for it's title, keywords or description tag. I think I need to overwrite these site-wide meta tags somehow. This is what I am trying to figure out.

Thanks,

Jeff



70
jeffgr
Easiest way to add custom page title, keywords & description to blank module?
  • 2007/9/11 17:20

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Hi everyone,

I am using the PageWrap module to display static HTML pages within my XOOPS site. Here is the code of the index.php file of this module:


<?php
include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>
My HTML page content goes here.
<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>


This works for me quite well, and I end up with a custom page module that looks like this:

http://xoopsexperts.com/modules/about/

I have renamed the module to be "about" in this case, and changed the xoops_version.php file to reflect this directory name change.

What I want to know is... how can I give this custom module it's own unique page title, meta keywords, and page meta description tag?

I don't want to add these tags onto the title, keywords or description tags that I use on the rest of the site...I just want this module to have it's own unique tags.

Any ideas on the easiest way to do this? I think I need to bypass the header.php file... or is there someway to "override" the main meta tags?

Thanks,

Jeff




TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 20 »



Login

Who's Online

238 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 238


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits