PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 11-17-2005, 08:20 PM   #1
bvr
Green Mole
 
Join Date: Nov 2005
Posts: 3
Question Manually set title for spidered page

I've got a list of about 120 external article links that I need to spider, but they all have the same title for each page. So obviously when a search is then performed, you can't really tell which article titles are listed in the results. So what I'd like to do is have a title override on the admin panel page which would just be a <input type="text" name="overridetitle">. It'd only be used to replace the parse robot found title if it's not blank.

Any ideas on how I'd go about doing this?


Thank you in advance,

Alex
bvr is offline   Reply With Quote
Old 11-18-2005, 02:41 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hmm, a textbox such as that would be applied to all pages, unless you index page by page, though maybe I'm misunderstanding. A better solution might be to set the title based on another HTML tag such as in this thread.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 11-18-2005, 04:17 PM   #3
bvr
Green Mole
 
Join Date: Nov 2005
Posts: 3
Sorry I guess I wasn't clear in my explanation of the problem.

- I have 110 external links to pages that house scientific articles that I need to spider
- Each page has the same title tag value as the next one (<title>same for each article</title>)

Problem: After spidering all 110 pages and performing a search against them, I get lots of responses but they all have the same title. The desired result is for each return from search.php to have the title of the article as the heading

I had a look at the posting you'd mentioned. Most of titles in the articles are surrounded by <h2>, unfortunately this is not the case 100% of the time (more like 80%). So that won't work.

Proposed Solution: What I'm thinking is that I keep the default <title> capture but have an optional override text field in the 'phpdig admin' page. So essentially, on this page I'd add a text field: <input type='text' name='manual_title'>

If this field is populated, only one URI (the first in the list) would be spidered and instead of parsing the <title> tag for that URI the title within $_POST['manual_title'] would be used.

I've been trying to get this to work, but what ends up happening is the custom title is repeated a bunch of times on search result listing. I guess it's being captured multiple times within a loop in robot_functions.php. All I really need is some code in robot_functions.php that will look for $_POST['manual_title'] and if it's populated, use its value instead of parsing.

I appreciate the help!


Alex
bvr is offline   Reply With Quote
Old 11-22-2005, 12:45 PM   #4
bvr
Green Mole
 
Join Date: Nov 2005
Posts: 3
I've implemented this functionality. If anyones interested, let me know and I'll post it here.

Alex
bvr is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display first H2 tag as title instead of page title mdavila How-to Forum 5 02-27-2005 06:48 PM
How to index only part of page <title>? visioneer How-to Forum 4 08-24-2004 10:24 PM
Page Title not shown in Result?? stefanw Troubleshooting 5 05-04-2004 11:31 PM
Is it possible to manually stack a site with keywords paullind Troubleshooting 4 03-29-2004 03:35 PM
Can I limit the page title length, that gets saved? Wayne McBryde How-to Forum 1 01-11-2004 01:19 PM


All times are GMT -8. The time now is 10:34 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.