Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
G_Gekko
New Member
New Member



Joined: Apr 15, 2005
Posts: 5

PostPosted: Fri Apr 15, 2005 8:10 am Reply with quote

Hi
does anyone know if there is a way to get dynamic titles code for universal module?

Or does anyone feel like creating it Wink

regards
 
View user's profile Send private message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Sat Apr 16, 2005 9:31 am Reply with quote

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. +.
 
View user's profile Send private message
G_Gekko







PostPosted: Sat Apr 16, 2005 10:05 am Reply with quote

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







PostPosted: Sat Apr 16, 2005 10:44 am Reply with quote

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: [ Only registered users can see links on this board! Get registered or login! ]

Wink
 
VinDSL
Life Cycles Becoming CPU Cycles



Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Sat Apr 16, 2005 11:45 am Reply with quote

I don't know exactly what you want to do, but here's an example on my site.

Link: [ Only registered users can see links on this board! Get registered or login! ]

The browser's title bar displays the name of the site, the module, the category, and the topic. If that's what you're looking for here's the (tweaked) code I use on my site PHP-Nuke 6.5 (mod'ed & patched) web site.

Link: [ Only registered users can see links on this board! Get registered or login! ]

Here's a discussion on the changes I made to the code.

Link: [ Only registered users can see links on this board! Get registered or login! ]

It's been reported that this hack doesn't work on PHP-Nuke 7.5+, but I would imagine that it's easily fixable... Wink

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::. 
View user's profile Send private message Visit poster's website ICQ Number
gotcha
Regular
Regular



Joined: Mar 14, 2005
Posts: 91

PostPosted: Sat Apr 16, 2005 9:28 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website
G_Gekko







PostPosted: Sun Apr 17, 2005 5:07 am Reply with quote

Hi
well thanks to your help i been able get the forum titles to work. I had to use the
http://www.netflake.com/modules.php?op=modload&name=Downloads&file=index&req=viewdownloaddetails&lid=26
module combined with Sn dynamic titles forum code and i also added som of VinDSL custom code from http://www.nukecops.com/postt37116.html.

I am however no closer to getting dynamic titles for universal module found at http://download.e-devstudio.com/file/1/ (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







PostPosted: Thu Apr 21, 2005 9:15 pm Reply with quote

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

PostPosted: Mon May 09, 2005 10:54 pm Reply with quote

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?
 
View user's profile Send private message
aoratos
New Member
New Member



Joined: Jun 07, 2005
Posts: 3

PostPosted: Tue Jun 07, 2005 7:38 am Reply with quote

intelli, the code you display above? where do i put it?

and secondly it displays the topic titles right? i also have 7.6
 
View user's profile Send private message
jib_intelli







PostPosted: Tue Jun 07, 2005 11:35 am Reply with quote

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







PostPosted: Tue Jun 07, 2005 3:17 pm Reply with quote

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







PostPosted: Wed Jun 08, 2005 11:11 am Reply with quote

Dunno. Perhaps the viewer will require a greek font Question
 
nihplod
New Member
New Member



Joined: Jan 03, 2006
Posts: 2

PostPosted: Tue Jan 03, 2006 2:05 pm Reply with quote

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 Wink

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
Wink


Last edited by nihplod on Thu Feb 16, 2006 9:21 am; edited 1 time in total 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Jan 03, 2006 7:07 pm Reply with quote

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

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Susann







PostPosted: Tue Jan 03, 2006 7:53 pm Reply with 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.

@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







PostPosted: Wed Jan 04, 2006 3:11 am Reply with quote

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©