<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[DeltaScripts - html site map]]></title>
	<link rel="self" href="http://www.deltascripts.com/board/extern.php?action=feed&amp;tid=5987&amp;type=atom"/>
	<updated>2005-07-19T05:27:28Z</updated>
	<generator>PunBB</generator>
	<id>http://www.deltascripts.com/board/viewtopic.php?id=5987</id>
		<entry>
			<title type="html"><![CDATA[html site map]]></title>
			<link rel="alternate" href="http://www.deltascripts.com/board/viewtopic.php?pid=20545#p20545"/>
			<content type="html"><![CDATA[<p>copy and paste the applicable code to a new file named sitemap.php or something similiar. and link to it off your home page or footer...<br />on call the script generates a list of links to every listing using&nbsp; the &quot;sitetitle&quot; as the anchor text. to list the &quot;sitedesc&quot; or use other fields follow the instructions in the code....also the 100 link per page rule does not apply to sitemap files, you can use as many as needed</p><p>for rewritten urls using this rewrite code<br /></p><div class="codebox"><pre><code>RewriteEngine on 
#RewriteRule ^~&amp;#40;.*&amp;#41;$ /profile.php?profile=$1 &amp;#91;L&amp;#93; 
RewriteRule ^&amp;#40;&amp;#91;a-zA-Z0-9&amp;#93;*&amp;#41;.html detail.php?siteid=$1</code></pre></div><p>use this code<br /></p><div class="codebox"><pre><code>&lt;?php
// HTML SITE MAP FOR REWRITTEN URLS

// SETTINGS TO BE EDITED 
$url = &quot;http&amp;#58;//www.domain.com/classifieds/&quot; ;  // url to directory must have trailing slash
$title = &quot;page title&quot; ;   // page title 
$keywords = &quot;keywords&quot; ;          //  keywords
$metadesc = &quot;description&quot; ;          //  description of your site
$hostname_sitemap = &quot;localhost&quot;;         // mysql location  
$database_sitemap = &quot;xxxxxxxxxxxxxxxxx&quot;;  // mysql database
$username_sitemap = &quot;xxxxxxxxxxx&quot;;        // mysql user 
$password_sitemap = &quot;xxxxxxxxxx&quot;;        //  mysql password

//hmmmmm dunno what to say 
$sitemap = mysql_pconnect&amp;#40;$hostname_sitemap, $username_sitemap, $password_sitemap&amp;#41; or trigger_error&amp;#40;mysql_error&amp;#40;&amp;#41;,E_USER_ERROR&amp;#41;; 

// okay know let&#039;s hook up with our base and slide our query in
mysql_select_db&amp;#40;$database_sitemap, $sitemap&amp;#41;;
$query_Recordset1 = &quot;SELECT * FROM ad&quot;;
$Recordset1 = mysql_query&amp;#40;$query_Recordset1, $sitemap&amp;#41; or die&amp;#40;mysql_error&amp;#40;&amp;#41;&amp;#41;;
$row_Recordset1 = mysql_fetch_assoc&amp;#40;$Recordset1&amp;#41;;
$totalRows_Recordset1 = mysql_num_rows&amp;#40;$Recordset1&amp;#41;;
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;title&gt;&lt;? echo $title ?&gt;&lt;/title&gt;
&lt;meta name=&quot;keywords&quot; content=&quot;&lt;? echo $keywords ?&gt;&quot;&gt;
&lt;meta name=&quot;description&quot; content=&quot;&lt;? echo $metadec ?&gt;&quot;&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;!-- start sitemap --&gt;
&lt;?php do &amp;#123; ?&gt;
&lt;table width=&quot;100%&quot;  border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
  &lt;tr&gt;
&lt;!-- start url list --&gt;
    &lt;td width=&quot;42%&quot;&gt;&lt;a href=&quot;&lt;? echo $url ?&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;siteid&#039;&amp;#93;; ?&gt;.html&quot; target=&quot;_blank&quot;&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;sitetitle&#039;&amp;#93;; ?&gt; &lt;/td&gt;
&lt;!--  to add other database fields as links use this code   &lt;a href=&quot;&lt;? echo $url ?&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;siteid&#039;&amp;#93;; ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;    to just print text use ?php echo $row_Recordset1&amp;#91;&#039;e_8&#039;&amp;#93;; ?&gt; replacing  siteid or 8 with the needed database field --&gt;
&lt;td width=&quot;58%&quot; rowspan=&quot;3&quot; valign=&quot;top&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
&lt;!-- start description-- to show the description simply remove the comment tages from in front --&gt;
&lt;!--   &lt;td class=&quot;desc&quot;&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;sitedescription&#039;&amp;#93;; ?&gt;&lt;/td&gt; 
&lt;!-- end description --&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;!-- end item --&gt;
&lt;?php &amp;#125; while &amp;#40;$row_Recordset1 = mysql_fetch_assoc&amp;#40;$Recordset1&amp;#41;&amp;#41;; ?&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div><p>for normal urls use this code<br /></p><div class="codebox"><pre><code>&lt;?php
// HTML SITE MAP FOR NORMAL URLS

// SETTINGS TO BE EDITED 
$url = &quot;http&amp;#58;//www.domain.com/classifieds/&quot; ;  // url to directory must have trailing slash
$page = &quot;detail.php?siteid=&quot;;     //no need to edit 
$title = &quot;page title&quot; ;   // page title 
$keywords = &quot;keywords&quot; ;          //  keywords
$metadesc = &quot;description&quot; ;          //  description of your site
$hostname_sitemap = &quot;localhost&quot;;         // mysql location  
$database_sitemap = &quot;xxxxxxxxxxxxxxxxx&quot;;  // mysql database
$username_sitemap = &quot;xxxxxxxxxxx&quot;;        // mysql user 
$password_sitemap = &quot;xxxxxxxxxx&quot;;        //  mysql password

//hmmmmm dunno what to say 
$sitemap = mysql_pconnect&amp;#40;$hostname_sitemap, $username_sitemap, $password_sitemap&amp;#41; or trigger_error&amp;#40;mysql_error&amp;#40;&amp;#41;,E_USER_ERROR&amp;#41;; 

// okay know let&#039;s hook up with our base and slide our query in
mysql_select_db&amp;#40;$database_sitemap, $sitemap&amp;#41;;
$query_Recordset1 = &quot;SELECT * FROM ad&quot;;
$Recordset1 = mysql_query&amp;#40;$query_Recordset1, $sitemap&amp;#41; or die&amp;#40;mysql_error&amp;#40;&amp;#41;&amp;#41;;
$row_Recordset1 = mysql_fetch_assoc&amp;#40;$Recordset1&amp;#41;;
$totalRows_Recordset1 = mysql_num_rows&amp;#40;$Recordset1&amp;#41;;
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;title&gt;&lt;? echo $title ?&gt;&lt;/title&gt;
&lt;meta name=&quot;keywords&quot; content=&quot;&lt;? echo $keywords ?&gt;&quot;&gt;
&lt;meta name=&quot;description&quot; content=&quot;&lt;? echo $metadec ?&gt;&quot;&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;!-- start sitemap --&gt;
&lt;?php do &amp;#123; ?&gt;
&lt;table width=&quot;100%&quot;  border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
  &lt;tr&gt;
&lt;!-- start url list --&gt;
    &lt;td width=&quot;42%&quot;&gt;&lt;a href=&quot;&lt;? echo $url.$page ?&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;siteid&#039;&amp;#93;; ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;sitetitle&#039;&amp;#93;; ?&gt; &lt;/td&gt;
&lt;!--  to add other database fields as links use this code   &lt;a href=&quot;&lt;? echo $url.$page ?&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;siteid&#039;&amp;#93;; ?&gt;.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;    to just print text use ?php echo $row_Recordset1&amp;#91;&#039;e_8&#039;&amp;#93;; ?&gt; replacing  siteid or 8 with the needed database field --&gt;
&lt;td width=&quot;58%&quot; rowspan=&quot;3&quot; valign=&quot;top&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
&lt;!-- start description-- to show the description simply remove the comment tages from in front --&gt;
&lt;!--   &lt;td class=&quot;desc&quot;&gt;&lt;?php echo $row_Recordset1&amp;#91;&#039;sitedescription&#039;&amp;#93;; ?&gt;&lt;/td&gt; 
&lt;!-- end description --&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;!-- end item --&gt;
&lt;?php &amp;#125; while &amp;#40;$row_Recordset1 = mysql_fetch_assoc&amp;#40;$Recordset1&amp;#41;&amp;#41;; ?&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/body&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ambglb]]></name>
				<uri>http://www.deltascripts.com/board/profile.php?id=3121</uri>
			</author>
			<updated>2005-07-19T05:27:28Z</updated>
			<id>http://www.deltascripts.com/board/viewtopic.php?pid=20545#p20545</id>
		</entry>
</feed>
