Author |
Message |
G_Gekko
New Member


Joined: Apr 15, 2005
Posts: 5
|
Posted:
Fri Apr 15, 2005 8:10 am |
|
Hi
does anyone know if there is a way to get dynamic titles code for universal module?
Or does anyone feel like creating it
regards |
|
|
|
 |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Sat Apr 16, 2005 9:31 am |
|
If you are looking for dynamic titles for all the other modules Content, Downloads,Forums,News,Reviews, Section,Story Archive and Web Links you can use the addon SN Dynamic Titles.
This Addon has been tested on PHP-Nuke 6.5-6.9, but I think it works also under 7. +. |
|
|
|
 |
G_Gekko

|
Posted:
Sat Apr 16, 2005 10:05 am |
|
I have tried it and it didn¨t wok all that well. It uses the text from the forum posts in stead of the topices name for the title. I also added custom code for encyclopedie but haven¨t found anything for universal module..
Or a working forum dynamic title script. |
|
|
|
 |
Susann

|
Posted:
Sat Apr 16, 2005 10:44 am |
|
I just saw at warp speed the same addon and it`s only till Nuke 7.0.
I don`t know. I have this addon, but I never tried it for my site.
You can also ask here: http://www.conrads-berlin.de/
 |
|
|
|
 |
VinDSL
Life Cycles Becoming CPU Cycles

Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com
|
Posted:
Sat Apr 16, 2005 11:45 am |
|
|
 |
 |
gotcha
Regular


Joined: Mar 14, 2005
Posts: 91
|
Posted:
Sat Apr 16, 2005 9:28 pm |
|
Ive had great success with it on nuke 7.5 patched 2.9. I don't remember changing anything except how some of the titles were formatted and for custom modules. |
|
|
|
 |
G_Gekko

|
Posted:
Sun Apr 17, 2005 5:07 am |
|
Hi
well thanks to your help i been able get the forum titles to work. I had to use the
Only registered users can see links on this board! Get registered or login!
module combined with Sn dynamic titles forum code and i also added som of VinDSL custom code from Only registered users can see links on this board! Get registered or login!.
I am however no closer to getting dynamic titles for universal module found at Only registered users can see links on this board! Get registered or login! (a creat module by the way). Could anyone take a look it or recommend someone that i could hire for a reasonable cost to create a dynamic titles script for this module?
Thanks in advance |
|
|
|
 |
gotcha

|
Posted:
Thu Apr 21, 2005 9:15 pm |
|
I would be able to take care of that for a reasonable price. ztgotcha -at- hotmail -dot- com |
|
|
|
 |
jib_intelli
Hangin' Around

Joined: Aug 17, 2004
Posts: 43
|
Posted:
Mon May 09, 2005 10:54 pm |
|
I use the following to get dynamic titles on my PHPNuke 7.6
Code:<?php
/********************************************************************/
/* SN Dynamic Titles Addon */
/* =========================== */
/* Copyright (c) 2003 by Greg Schoper */
/* http://nuke.schoper.net */
/* */
/* Based on code from PHP-Nuke */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or */
/* modify it under the terms of the GNU General Public License as */
/* published by the Free Software Foundation; either version 2 of */
/* the License. */
/********************************************************************/
/* Credit to unknown author of original forums code in */
/* includes/dynamic_titles.php. */
/********************************************************************/
if (eregi("dynamic_titles.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
// Item Delimeter
$item_delim = "||";
$newpagetitle = "";
global $name;
include ("config.php");
include("db/db.php");
// Forums
if($name=="Forums"){
global $p,$t,$forum,$f;
$newpagetitle = "$name";
if($p) {
$sql = "SELECT post_subject, post_id FROM ".$prefix."_bbposts_text WHERE post_id='$p'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$title = $row[post_subject];
$post = $row[post_id];
$newpagetitle = "$name $item_delim Post $post $item_delim $title";
}
if($t) {
$sql = "SELECT topic_title, forum_id FROM ".$prefix."_bbtopics WHERE topic_id='$t'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$title = $row[topic_title];
$forum = $row[forum_id];
$sql = "SELECT forum_name FROM ".$prefix."_bbforums WHERE forum_id='$forum'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$forum = $row[forum_name];
$newpagetitle = "$item_delim $name $item_delim $forum $item_delim $title";
}
elseif($f) {
$sql = "SELECT forum_name FROM ".$prefix."_bbforums WHERE forum_id='$f'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$forum = $row[forum_name];
$newpagetitle = "$item_delim $name $item_delim $forum";
}
}
// News
if($name=="News"){
global $file,$sid,$new_topic;
$newpagetitle= "$item_delim $name";
if ($new_topic!=""){
$sql = "SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$top = $row[topictext];
$newpagetitle= "$item_delim $top";
}
if ($file=="article"){
$sql = "SELECT title, topic FROM ".$prefix."_stories WHERE sid='$sid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$art = $row[title];
$top = $row[topic];
$sql = "SELECT topictext FROM ".$prefix."_topics WHERE topicid='$top'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$top = $row[topictext];
$newpagetitle= "$item_delim $top $item_delim $art";
}
}
// Topics
if($name=="Topics"){
$newpagetitle = "$item_delim "._ACTIVETOPICS."";
}
// Downloads
if($name=="Downloads"){
global $d_op,$cid,$lid;
$newpagetitle = "$item_delim $name";
if($d_op=="viewdownload") {
$sql = "SELECT title, parentid FROM ".$prefix."_downloads_categories WHERE cid='$cid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$cat = $row[title];
$parent = $row[parentid];
if($parent=="0"){
$newpagetitle = "$item_delim $name $item_delim $cat";
}
else{
$sql = "SELECT title FROM ".$prefix."_downloads_categories WHERE cid='$parent'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$parent = $row[title];
$newpagetitle = "$item_delim $name $item_delim $parent $item_delim $cat";
}
}
if($d_op=="viewdownloaddetails" || $d_op=="getit") {
$sql = "SELECT title FROM ".$prefix."_downloads_downloads WHERE lid='$lid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$dl = $row[title];
$newpagetitle = "$item_delim $name $item_delim $dl";
}
}
// Web Links
if($name=="Web_Links"){
global $l_op,$cid,$lid;
$name=ereg_replace("_", " ", "$name");
$newpagetitle = "$item_delim $name";
if($l_op=="viewlink") {
$sql = "SELECT title, parentid FROM ".$prefix."_links_categories WHERE cid='$cid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$cat = $row[title];
$parent = $row[parentid];
if($parent=="0"){
$newpagetitle = "$item_delim $name $item_delim $cat";
}
else{
$sql = "SELECT title FROM ".$prefix."_links_categories WHERE cid='$parent'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$parent = $row[title];
$newpagetitle = "$item_delim $name $item_delim $parent $item_delim $cat";
}
}
}
// Content
if($name=="Content"){
global $pa,$cid,$pid;
$newpagetitle = "$item_delim $name";
if($pa=="list_pages_categories") {
$sql = "SELECT title FROM ".$prefix."_pages_categories WHERE cid='$cid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$cat = $row[title];
$newpagetitle = "$item_delim $name $item_delim $cat";
}
if($pa=="showpage") {
$sql = "SELECT title, cid FROM ".$prefix."_pages WHERE pid='$pid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$page = $row[title];
$cid = $row[cid];
$sql = "SELECT title FROM ".$prefix."_pages_categories WHERE cid='$cid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$cat = $row[title];
$newpagetitle = "$item_delim $name $item_delim $cat $item_delim $page";
}
}
// Reviews
if($name=="Reviews"){
global $rop,$id;
$newpagetitle = "$item_delim $name";
if($rop=="showcontent") {
$sql = "SELECT title FROM ".$prefix."_reviews WHERE id='$id'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$rev = $row[title];
$newpagetitle = "$item_delim $name $item_delim $rev";
}
}
// Stories Archive
if($name=="Stories_Archive"){
global $sa,$year,$month_l;
$name=ereg_replace("_", " ", "$name");
$newpagetitle = "$item_delim $name";
if($sa=="show_month") {
$newpagetitle = "$item_delim $name $item_delim $month_l, $year";
}
}
// Sections
if($name=="Sections"){
global $op,$secid,$artid;
$newpagetitle = "$item_delim $name";
if($op=="listarticles") {
$sql = "SELECT secname FROM ".$prefix."_sections WHERE secid='$secid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$sec = $row[secname];
$newpagetitle = "$item_delim $name $item_delim $sec";
}
if($op=="viewarticle") {
$sql = "SELECT title, secid FROM ".$prefix."_seccont WHERE artid='$artid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$art = $row[title];
$cid = $row[secid];
$sql = "SELECT secname FROM ".$prefix."_sections WHERE secid='$cid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$sec = $row[secname];
$newpagetitle = "$item_delim $name $item_delim $sec $item_delim $art";
}
}
// Catchall for anything we don't have custom coding for
if($newpagetitle==""){
$name=ereg_replace("_", " ", "$name");
$newpagetitle="$item_delim $name";
}
// Admin Pages
if(substr($_SERVER['REQUEST_URI'], 0, 10)=="/admin.php"){
$newpagetitle="$item_delim Administration";
}
// If we're on the main page let's use our site slogan
if($_SERVER['REQUEST_URI']=="/index.php" || $_SERVER['REQUEST_URI']=="/"){
$newpagetitle="$item_delim $slogan";
}
// We're Done! Place the Title on the page
echo "<title>$sitename $newpagetitle</title>\n";
?>
|
In the Modules Administration, when you edit a module, there is an option of using custom module names. These custom module names are shown in the modules block. I want to be able to use these custom module names in the Dynamic titles instead of the module folder name. How do I do that? Any idea? |
|
|
|
 |
aoratos
New Member


Joined: Jun 07, 2005
Posts: 3
|
Posted:
Tue Jun 07, 2005 7:38 am |
|
intelli, the code you display above? where do i put it?
and secondly it displays the topic titles right? i also have 7.6 |
|
|
|
 |
jib_intelli

|
Posted:
Tue Jun 07, 2005 11:35 am |
|
Hi Aoratos. put that into your includes/ folder and name it as dynamic_titles.php. And you'll have to make a change in header.php too.
Quote: | 1.) Copy dynamic_titles.php to includes/dynamic_titles.php
2.) In file header.php:
find:
echo "<title>$sitename $pagetitle</title>\n";
change to:
include("includes/dynamic_titles.php");
//echo "<title>$sitename $pagetitle</title>\n"; |
|
|
|
|
 |
aoratos

|
Posted:
Tue Jun 07, 2005 3:17 pm |
|
it works like a charm
the only problem i have in the homepage is that the Greek Title i chg through my DB is showing like illegible letters
can i fix that? |
|
|
|
 |
jib_intelli

|
Posted:
Wed Jun 08, 2005 11:11 am |
|
Dunno. Perhaps the viewer will require a greek font  |
|
|
|
 |
nihplod
New Member


Joined: Jan 03, 2006
Posts: 2
|
Posted:
Tue Jan 03, 2006 2:05 pm |
|
G_Gekko wrote: | Hi
does anyone know if there is a way to get dynamic titles code for universal module?
Or does anyone feel like creating it
regards |
If anyone is interesting yet...
This code works works fine but only shows the title of the document and the module name, some like this: 'your name site - Universal module - Article title'
The code:
in the index.php of tour universal module look for this:
Code:$modtitle = getconfigvar("modtitle");
$pagetitle = "- $modtitle";
|
And change it to this: Code:// mostrar títulos de los documentos en la barra del explorador
if($vid != ""){
$sql = "SELECT title FROM ".$prefix."_".$mainprefix."_items WHERE id = '$vid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$bar_title = stripslashes($row[title]);
$modtitle = getconfigvar("modtitle");
$pagetitle = "- $modtitle : $bar_title";
}elseif (($vid == "") && ($cid != "")) {
$sql = "SELECT title FROM ".$prefix."_".$mainprefix."_categories WHERE id = '$cid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$bar_title = stripslashes($row[title]);
$modtitle = getconfigvar("modtitle");
$pagetitle = "- $modtitle : $bar_title";
}else{
$modtitle = getconfigvar("modtitle");
$pagetitle = "- $modtitle";
}
//Fin de mostrar títulos
|
That's all
Regards from Spain
Nihplod
Edited for a Code upgrade  |
Last edited by nihplod on Thu Feb 16, 2006 9:21 am; edited 1 time in total |
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Jan 03, 2006 7:07 pm |
|
G_Gekko wrote: | I have tried it and it didn¨t wok all that well. It uses the text from the forum posts in stead of the topices name for the title. I also added custom code for encyclopedie but haven¨t found anything for universal module..
Or a working forum dynamic title script. |
This is more of a general follow-on question to the experienced SEO'ers here. I, too, have not liked how the latest Forum post text shows up as the dynamic title, but then got to thinking that it may have been that way for a reason?
Is it better to have the search engine index have as its title text the most recent "change" and related text than to still be "stuck" on the original topic subject? Would it also not cause more indexing updates because it is constantly changing?
I appologize up front that I am just now looking into SEO because I am just dumbfounded why Google doesn't bring my site up in searches with very specific keywords that I have all over the META tags, content, titles, etc.
I have wanted to change mine, but wanted to see what others here think.
TIA,
montego |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Susann

|
Posted:
Tue Jan 03, 2006 7:53 pm |
|
@nihplod
What version of universal module are you talking about ? I´m using an older version of this module and the index.php is different.
@montego
Dynamic titles are really great but if your forum isn´t optimized in other ways it´s not enough for indexing completly in search engines because of different things e.g. session id´s used in the forums. |
|
|
|
 |
nihplod

|
Posted:
Wed Jan 04, 2006 3:11 am |
|
Quote: | @nihplod
What version of universal module are you talking about ? I´m using an older version of this module and the index.php is different. |
I'm using the Universal Module final version (2.5 Final).
If your version is older than mine, you may probe locating 'require_once("mainfile.php");' in your index.php and putting code just before.
Nihplod |
|
|
|
 |
|