Page Title thema?? rubrik?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
mboydnv
Posts: 5
Joined: Sat Jul 17, 2004 10:36 pm

Page Title thema?? rubrik?

Post by mboydnv »

I would like to have the {writeRubrik} or {writeThema}, I think it's thema as my page title, however when i include it on my template/index.html it doesn't call up? Just want to take the title in the artikel.html file...hope this makes sense

for example (template:index.html):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Grand Canyon Tours - Las Vegas Tours - Hoover Dam Tours - Helicopter Tours</title>

Would like something like this..

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>{writeRubrik}</title>
canuck
Posts: 39
Joined: Thu Jul 08, 2004 11:58 am

Post by canuck »

mboydnv
Posts: 5
Joined: Sat Jul 17, 2004 10:36 pm

Post by mboydnv »

canuck wrote:viewtopic.php?t=894
saw this thread, what I want to do is have a different title for each post. I think it is rubrik or thema, and I need that in the title tag,
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the name of the current category is in the <title> in version 1.4.0. I can post a backport for 1.3.x if you like.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
mboydnv
Posts: 5
Joined: Sat Jul 17, 2004 10:36 pm

Post by mboydnv »

Thorsten wrote:Hi,

the name of the current category is in the <title> in version 1.4.0. I can post a backport for 1.3.x if you like.

bye
Thorsten
Not sure what ya meant...sorry

basically, I used phpmyfaq to store travel tours. After creating a new record and enterig for the "theme""Las Vegas Helicopter Night tour", the record would be created withOUT "Las Vegas Helicopter Night tour" in the title of the html header. i want every record i create/theme (thema -whatever) to show in the html title header. In vers 1.3.9 i have a title but it is the same title on all pages, I basically want to optimize it a bit for google. This should be real easy to do. I put {writeContent} in the html title tage and that worked, just wanted to know what tag to put in... {title} does NOt work, thema etc... any ideas?
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay, we're thinking about the same. Here's a hack to do this:

Look for:

Code: Select all

/* load templates */
$tpl = new phpmyfaqTemplate ( array(
				"index" => 'template/index.html',
				"writeContent" => 'template/'.$includeFile.'.html'
				));
and add after that:

Code: Select all

/* found a record ID? */
if (isset($id) && checkIntVar($id) == TRUE) {
    $title = $title." - ".stripslashes(getThema($id, $lang));
	}
else {
    $title = $title." -  powered by phpMyFAQ";
	}
Then change a few lines below the following line

Code: Select all

				"writeTitle" => $title.' - powered by phpMyFAQ',
to

Code: Select all

				"writeTitle" => $title,
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
mboydnv
Posts: 5
Joined: Sat Jul 17, 2004 10:36 pm

?????

Post by mboydnv »

no problem adding the code to the index.php file:

/* found a record ID? */
if (isset($id) && checkIntVar($id) == TRUE) {
    $title = $title." - ".stripslashes(getThema($id, $lang));
   }
else {
    $title = $title." -  powered by phpMyFAQ";
   }

however:

Then change a few lines below the following line
Code: "writeTitle" => $title.' - powered by phpMyFAQ',

to

Code: "writeTitle" => $title,

This code does not exist: "writeTitle" => $title.' - powered by phpMyFAQ',

and then next lines of code are:

/* get main template, set main variables */
$tpl->processTemplate ("index", array(
"writeTitle" => $title,
"metaDescription" => $metaDescription,

So It's already: "writeTitle" => $title,

????
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I meant this line. Does it work?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
mboydnv
Posts: 5
Joined: Sat Jul 17, 2004 10:36 pm

Post by mboydnv »

Thorsten wrote:Hi,

I meant this line. Does it work?

bye
Thorsten

I'm too confused... I appreciate the effort, but i need to know what line you are talking about specifically and what code for it.... I am not a php developer... I cut and paste where told


thanks

PS: COuld you re-edit the above post of yours with the correct code? And I'll give it a try again, thnak you!!! =)
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

please send me an e-mail I will send you a fully patched file.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply