Get XOOPS XOOPS FAQ Forums News Themes Modules
New Posts New Topics All Forums Index General Modules Themes Development International XOOPS.org

XOOPS vs. Herko Coomans

Make a donation

Please select an amount to donate


Do you want your username revealed with your donation?
Yes - List me as a Generous Donor
No - List my donation as from an Anonymous Donor


Search

Local Support Sites

Cumulus Tag Cloud

admin Arabic banner block Christmas comments cumulus DayDawn dhsoft e-Commerce E-Learning Google GUI hacks instant-zero jQuery module news Nordic Olédrion oxygen PageRank security SEO simple-XOOPS sport tag Theme wiki xoops

New Users

Registering user

# 96568

dvsshoescom

Welcome to XOOPS!
XOOPS Code hosted on SourceForge


 Bottom   Previous Topic   Next Topic

1 2 »
#1 Posted on: 2008/11/5 9:05 Assign a title to a search results page
Hi, when you do some search query like "john" via http://freelancersupport.com/modules/profile/search.php, you get this page: http://freelancersupport.com/modules/ ... =john&&op=results

The question is how do I assign the query text "john" as a title of the results page (the http://freelancersupport.com/modules/ ... ame=t&&op=results one).

Like when you search for something (lets say "translation jobs") in google, the title of the results page (http://www.google.com/search?hl=en&am ... =f&oq=translation+job) is "Translation jobs - Google search".

Thanks in advance

Top


Website Directory | Freelance Translation Jobs | Russian lessons
deka87
Just can't stay away
Joined:
2007/10/5 14:50
From Russia
Posts: 762
(Show More) (Show Less)
#2 Posted on: 2008/11/5 10:47 Re: Assign a title to a search results page
Add a line in /modules/profile/search.php to assign the required title to the template eg.
$xoopsTpl->assign('xoops_pagetitle','Translation jobs - Google search');



Top

ghia
Community Support Member
Joined:
2008/7/3 15:19
From Belgium
Posts: 3665
(Show More) (Show Less)
#3 Posted on: 2008/11/5 11:12 Re: Assign a title to a search results page
I am afraid you got it wrong. I don't need a definite title for the search page. I need it to be variable and depend on the your query. Like if you search for JOBS teh title is JOBS, or if you search for TRANSLATION the title of the page is TRANSLATION.

Top


Website Directory | Freelance Translation Jobs | Russian lessons
deka87
Just can't stay away
Joined:
2007/10/5 14:50
From Russia
Posts: 762
(Show More) (Show Less)
#4 Posted on: 2008/11/5 12:11 Re: Assign a title to a search results page
$xoopsTpl->assign('xoops_pagetitle',$_GET['uname']);

Top


www.guidemap.gr - Beta is out...
kerkyra
Quite a regular
Joined:
2005/2/14 16:55
From Athens
Posts: 383
(Show More) (Show Less)
#5 Posted on: 2008/11/5 12:34 Re: Assign a title to a search results page
modules/profile/search.php

add near line 172

171 $string $myts->addSlashes(trim($_REQUEST['uname']));
172 $xoopsTpl->assign('xoops_pagetitle',$myts->htmlSpecialChars($string ));//ADDED
173 switch ($_REQUEST['uname_match']) {


Top


| BÁNÐÍT-X | d[ o_0 ]b
----------------
|XOOPS-USA|
Bandit-X
Module Developer
Joined:
2004/6/28 20:11
From His Top Secret Hideout.
Posts: 791
(Show More) (Show Less)
#6 Posted on: 2008/11/6 7:48 Re: Assign a title to a search results page
Quote:
modules/profile/search.php add near line 172 171 $string = $myts->addSlashes(trim($_REQUEST['uname'])); 172 $xoopsTpl->assign('xoops_pagetitle',$myts->htmlSpecialChars($string ));//ADDED 173 switch ($_REQUEST['uname_match']) {


this didnt work . i guess it should be added somewhere but not between those lines. it doesnt affect the title. any suggestions?

Top


Website Directory | Freelance Translation Jobs | Russian lessons
deka87
Just can't stay away
Joined:
2007/10/5 14:50
From Russia
Posts: 762
(Show More) (Show Less)
#7 Posted on: 2008/11/6 7:52 Re: Assign a title to a search results page
or maybe i'll try to simplify this. I need to make "Arabhic to English translators" title for this page http://freelancersupport.com/modules/ ... ge=English&op=results . how do I do that?

Top


Website Directory | Freelance Translation Jobs | Russian lessons
deka87
Just can't stay away
Joined:
2007/10/5 14:50
From Russia
Posts: 762
(Show More) (Show Less)
#8 Posted on: 2008/11/6 7:55 Re: Assign a title to a search results page
Try near the bottom just before this lines:

//hack
if (isset($_REQUEST['uname'])){
$string $myts->addSlashes(trim($_REQUEST['uname']));
$xoopsTpl->assign('xoops_pagetitle',$myts->htmlSpecialChars($string));
}

//end of hack
        
break;
}
include 
"footer.php";
?>


Top


Xoops User Utilities | Xoops Search Engine
trabis
XOOPS Developer
Joined:
2006/9/1 14:10
From Portugal
Posts: 1608
(Show More) (Show Less)
#9 Posted on: 2008/11/6 8:52 Re: Assign a title to a search results page
//hack
if (isset($_REQUEST['source_language']) && isset($_REQUEST['target_language'])){
$string $myts->addSlashes(trim($_REQUEST['source_language'])).' to '.$myts->addSlashes(trim($_REQUEST['target_language'])).' translators.';
$xoopsTpl->assign('xoops_pagetitle',$myts->htmlSpecialChars($string));
}

//end of hack
        
break;
}
include 
"footer.php";
?>


Top

ghia
Community Support Member
Joined:
2008/7/3 15:19
From Belgium
Posts: 3665
(Show More) (Show Less)
#10 Posted on: 2008/11/6 8:57 Re: Assign a title to a search results page
Thanks alot, guys! You really helped me out. Titles are essential for seo so I hope this could be helpful for others too.

Top


Website Directory | Freelance Translation Jobs | Russian lessons
deka87
Just can't stay away
Joined:
2007/10/5 14:50
From Russia
Posts: 762
(Show More) (Show Less)

 Top   Previous Topic   Next Topic

1 2 »

You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]