OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Dynamic Page content

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Search Engine Optimization and Web Business >> Dynamic Page content
Page: [1]
 
Athema

 

Posts: 5
Joined: 2/11/2009
Status: offline

 
Dynamic Page content - 2/24/2009 14:02:09   
Hi ya

I have a few sites that have dynamic page results so the pages change quite often, so I was wondering if anyone here has some code that will generate meta keywords and page description and Title based on the page contents being displayed?

I would consider paying someone to write it for me if anyone is interenested.

Please get in touch if there is someone out there that can help.
Tailslide

 

Posts: 6691
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Dynamic Page content - 2/25/2009 2:28:10   
If the information is being pulled from a database then you could always add another column or two in the table and add in appropriate information then just pull those from the db at the same time that the rest of the content is being pulled.

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to Athema)
TexasWebDevelopers

 

Posts: 720
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Dynamic Page content - 2/25/2009 9:10:17   
I am assuming that you want the keywords and title, etc. to change automatically without input just based on the text that is on the page. This isn't possible to do using straight server-side code. If you have the ability to install a .dll on the server that will convert the html to a text string then there are some examples floating around that might be of help. I was playing with the FSO and was able to give a path to an html page and then grab and write out several existing tags -- but that doesn't get you all the way to where you want to go.

<%
'On Error Resume Next
Dim geturl, title, description, keywords, strURL, con, results
Dim fso, file, path

'path = "\inetpub\wwwroot\websitename\default.asp"

' FileSystemObject
Set fso = CreateObject("Scripting.FileSystemObject")

' File Object
Set file = fso.OpenTextFile(path, 1, False)

' Reading the contents of the File into strFileContents
strFileContents = file.ReadAll

' Keywords
key1 = InStr(1, strFileContents, "<meta name=""keywords"" content=""", 1)
key1 = key1 + Len("<meta name=""keywords"" content=""")
key2 = InStr(key1, strFileContents, """>", 1)

keywords = "," & Trim(Mid(strFileContents, key1, (key2 - key1))) & ","
keywords = Replace (keywords, "'", " ")

' Description
desc1 = InStr(1, strFileContents, "<meta name=""description"" content=""", 1)
desc1 = desc1 + Len("<meta name=""description"" content=""")
desc2 = InStr(desc1, strFileContents, """>", 1)

description = Trim(Mid(strFileContents, desc1, (desc2 - desc1)))
description = Replace (description, "'", " ")

' Title
tit1 = InStr(1, lcase(strFileContents), "<title>", 1)
tit1 = tit1 + Len("<title>")
tit2 = InStr(tit1, strFileContents, "</title>", 1)

title = Trim(Mid(strFileContents, tit1, (tit2 - tit1)))
title = Replace (title, "'", " ")

response.write("title: " & title & "<br>")
response.write("description: " & description & "<br>")
response.write("keywords: " & keywords & "<br>")
response.write("url: " & url & "<br>")
response.write("mydate: " & mydate & "<br>")
%>

_____________________________

:)

Follow us on TWITTER

(in reply to Tailslide)
Page:   [1]

All Forums >> Web Development >> Search Engine Optimization and Web Business >> Dynamic Page content
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts