You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 352 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Changing Page Title for Content Pages [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
rotopoint
Nuke Soldier
Nuke Soldier


Joined: Sep 28, 2004
Posts: 17


PostPosted: Mon Oct 17, 2005 5:16 pm Reply with quoteBack to top

I've been trying to figure out how to get the page title of my PHPnuke content pages to include the title of the content page.

I know this has to have been done somwhere else, but my Googling doesn't turn up any help. If there's anybody that knows how to do this, it would be greatly appreciated.
Find all posts by rotopointView user's profileSend private message
T00LB0X
Nuke Cadet
Nuke Cadet


Joined: Oct 04, 2005
Posts: 1


PostPosted: Mon Oct 17, 2005 5:50 pm Reply with quoteBack to top

I don't get exactly what you want to do.
Let me translate what you said in my words.
You have a title page of PHP-Nuke.
And, you want to add that title page to contents module pages?

Is that right?
Find all posts by T00LB0XView user's profileSend private message
rotopoint
Nuke Soldier
Nuke Soldier


Joined: Sep 28, 2004
Posts: 17


PostPosted: Tue Oct 18, 2005 10:04 am Reply with quoteBack to top

Every Content Page has a Title. For example, I make a content page and name it "My Title".

In Internet Explorer, the title of the page at the top just shows the name of my web site - "ROTOPOINT FANTASY SPORTS".

I want it to work like the news module does. At the top of Internet Exploerer I would like it to say "ROTOPOINT FANTASY SPORTS - My Title" instead of just "ROTOPOINT FANTASY SPORTS"

I hope this makes better sense. Thanks for any assistance.
Find all posts by rotopointView user's profileSend private message
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1939

Location: Behind you

PostPosted: Tue Oct 18, 2005 10:52 am Reply with quoteBack to top

Do you want that to appear on the top of web-brower only when you click on Contetns module?

_________________
Home of the Enterprise PHP-NUKE
Find all posts by XyberianView user's profileSend private messageVisit poster's website
Cypher_489
Nuke Cadet
Nuke Cadet


Joined: Jul 31, 2005
Posts: 2

Location: England

PostPosted: Mon Oct 24, 2005 8:10 am Reply with quoteBack to top

In modules/Content/index.php, change:

Code:
$pagetitle = "- $module_name";


To:

Code:
global $prefix, $db;

$sqltitle = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_pages WHERE pid='$pid'"));

$title = $sqltitle['title'];
$pagetitle = "- $title";
Find all posts by Cypher_489View user's profileSend private messageVisit poster's websiteYahoo MessengerMSN Messenger
rotopoint
Nuke Soldier
Nuke Soldier


Joined: Sep 28, 2004
Posts: 17


PostPosted: Mon Oct 24, 2005 6:23 pm Reply with quoteBack to top

Thanks! It works!
Find all posts by rotopointView user's profileSend private message
Admin32
Nuke Soldier
Nuke Soldier


Joined: Sep 07, 2003
Posts: 28

Location: Greece

PostPosted: Thu Nov 24, 2005 10:24 am Reply with quoteBack to top

To extend this information a bit further, I'd like to ask how it would be possible to do the same for any custom made page displayed from phpnuke.

For example, I create my own php file, add the 'include header.php' statement and phpnuke wraps around it nicely. I'd now like to preserve the .php file's 'Title' page, and not have phpnuke override it each time.

How would this be possible ?
Find all posts by Admin32View user's profileSend private messageVisit poster's website
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Thu Nov 24, 2005 10:51 pm Reply with quoteBack to top

phpNuke will overwrite the title, because of the theme system used to wrap the code. The only thing supported by default is to add code to it by using the $pagetitle variable

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
obiwan_24
Nuke Cadet
Nuke Cadet


Joined: Dec 16, 2005
Posts: 1


PostPosted: Fri Dec 16, 2005 5:38 am Reply with quoteBack to top

Cool !
Thanx for the code Cypher_489 !!
It helped me. Another question : is it possible, with the title, to have the category displayed if one has been created for the content ?

Thank you.
Find all posts by obiwan_24View user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.037 Seconds - 284 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::