Author |
Message |
storebuilder
PHP-Portal Project

Joined: Mar 09, 2004
Posts: 169
Location: Telford UK
|
Posted:
Wed Jun 23, 2004 5:06 am |
|
When you enter a new article into the content module the page title is prefixed by the module name and the content category. Followed by the article pagetitle.
I would like to remove the module name and category prefixes leaving just the page title.
In index.php of the content module there is $pagetitle but altering this seems to make no difference.
Can anyone else suggest where else I should be looking please? |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 5:17 am |
|
I remembered that Raven had once helped me with something like this on nuke**** so I thought I would go and look for the post.
That's naughty! |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed Jun 23, 2004 5:28 am |
|
Can you give a "for" instance? I'm in a fog this morning and I can't track the issue. Thanks! |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 5:30 am |
|
The issue with the pop up's or the original question? |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 5:33 am |
|
for instance when you look at the page title in the current setup you see:
content tutorials secrets to success
Where content is the module name, tutorials is the category name and secrets to success is the article title.
Where as I would like it to display
secrets to success
This is purely so that my articles get indexed properly by google. |
|
|
|
 |
Raven

|
Posted:
Wed Jun 23, 2004 5:43 am |
|
Then you will need to use Google Tap (GT) if I am understanding correctly. AudioSlaved is the GT Guru so I'd recommend contacting him. |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 5:53 am |
|
No this is not a google tap thing.
When you look at the page title (what you see in the browser title bar)
of a content module http://www.storebuilder.co.uk/contentid-14.html what you are seeing in the page title is the title of the article prefixed by the module name and the category name.
I want to remove the module name and category prefix.
In this case what you are seeing is:
content tutorials article title
And I just want to display
article title
Is that clearer? |
|
|
|
 |
Raven

|
Posted:
Wed Jun 23, 2004 6:07 am |
|
I just clicked on that link and I don'e see what you are saying. I see
Content Tutorials Secrets to success - blueprints for making money on the internet.
That's what's in my browser title bar. |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 6:10 am |
|
Quote: |
Content Tutorials Secrets to success - blueprints for making money on the internet.
|
That's exactly it.
So I want it to display this instead
Secrets to success - blueprints for making money on the internet |
|
|
|
 |
Raven

|
Posted:
Wed Jun 23, 2004 6:17 am |
|
AHHHHHHHH I'll get back to you. Don't worry, it's just early and I haven't had my Pepsi yet  |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 6:27 am |
|
In index.php of the content module is this:
Code:
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$index = 1;
$pagetitle = "";
|
But the $pagetitle seems to serve no purpose? |
|
|
|
 |
Raven

|
Posted:
Wed Jun 23, 2004 6:32 am |
|
When I set $pagetitle = ''; it supresses it. What version of nuke are you using? |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 6:37 am |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 6:41 am |
|
Ok - the $pagetitle does suppress it - my mistake
So I just need to find out what to put in there. I will take a look. |
|
|
|
 |
Raven

|
Posted:
Wed Jun 23, 2004 6:42 am |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 7:29 am |
|
Well actually I was right the first time. Commenting out the $pagetitle makes no difference whatsoever.
When I looked after you said it was suppressed and tried it myself all I saw was "content - tiscali 10.0" in the browser - but I was looking at the root of the content module.
I have removed the $pagetitle from index.php and it makes no difference. |
|
|
|
 |
Raven

|
Posted:
Wed Jun 23, 2004 7:31 am |
|
I'll try it with my copy of 6.9 and let you know. I tested it on 7.1 before. |
|
|
|
 |
Audioslaved
Regular


Joined: Nov 15, 2003
Posts: 53
Location: Hawaii and the Fan Forum
|
Posted:
Wed Jun 23, 2004 7:45 am |
|
The $pagetitle is carried to the header.php, right here:
Code:
echo "<title>$sitename $pagetitle</title>\n";
|
|
_________________ The Audioslave Fan Forum
For the Fans, By the Fans
http://www.audioslaved.com |
|
|
 |
Audioslaved

|
Posted:
Wed Jun 23, 2004 8:03 am |
|
looking into this a bit more, I found the following in your web source code:
Code:
<title> Content Tutorials Secrets to success - blueprints for making money on the internet.</title>
<title> </title>
|
Weird, I am guessing the bottom one is actually the one in the header.php, I am off to find the wizard, be back soon! |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 8:06 am |
|
Stop, stop guys.
I think I have just realised what is happening. It's to do with the dynamic titles add on. |
|
|
|
 |
Audioslaved

|
Posted:
Wed Jun 23, 2004 8:07 am |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 8:26 am |
|
Well - a lot of good has come out of this and you have both just made someone very happy.
My day job is search engine optimisation and storebuilder is just a hobby site to make beer money. Everyone knows that dynamic sites are not the way to go for search engine optimisation right?
When I first set the site up and being a complete nuke newbie I seized on the dynamic titles add on and forgot about it - thinking that it was the answer to placing the correct page titles on each page.
Having done that I then spent huge amounts of time building the site and forgot about it.
Subsequently when I wanted to post a new news article I created a "blank" topics category so that the news was not preceded by the topic title. Not realising that it was the dynamic titles add on that was hindering my efforts.
So instead of removing $sitetitle from header.php - I removed the actual site title in preferences - and of course that created a huge new set of problems - like no site title in my newsletter LOL
So all of the stuff that I have struggled with for months and has slowed down the development of the site has suddenly been resolved for me.
In the beginning I knew next to no PHP so stuff like removing the $sitetitle etc was a non starter - but thanks to you guys I now have it sorted.
Now I can go and optimise the hell out of my php site "woohoo!"
 |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 9:06 am |
|
|
|
 |
storebuilder

|
Posted:
Wed Jun 23, 2004 9:45 am |
|
|
|
 |
|