PhpDig.net

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

Reply
 
Thread Tools
Old 12-13-2004, 01:35 PM   #1
Warmbells
Green Mole
 
Join Date: Sep 2004
Posts: 19
Site Map Code

Hi,

I have been looking at the thread on the site map code by Charter as I am very new to PHP I'm not sure where word wraps are appearing in the code on the forum, would it be possible for someone to email me a copy of the code as it should be?

Gerald
ged DOT bee AT virgin DOT net

Thanks
Warmbells is offline   Reply With Quote
Old 12-13-2004, 06:42 PM   #2
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
I'm thinking that you may actually not have a problem with word wrapping, due to the most recent upgrade of vBulletin, this forum's software. It now creates scrollable text boxes for code so that word wrapping probably isn't a problem. I'd be happy to verify that for you though if you can post a link to the thread you're referring to.
vinyl-junkie is offline   Reply With Quote
Old 12-14-2004, 06:54 AM   #3
Warmbells
Green Mole
 
Join Date: Sep 2004
Posts: 19
Thanks

The thread I was looking at is at http://www.phpdig.net/forum/showthread.php?t=699

Gerald
Warmbells is offline   Reply With Quote
Old 12-14-2004, 12:42 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Just highlight the code, and then copy-paste into a text editor to save.
__________________
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 12-14-2004, 01:51 PM   #5
Warmbells
Green Mole
 
Join Date: Sep 2004
Posts: 19
Thanks,

It runs on for me but I get the following errors

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/warmbell/public_html/site-map.php on line 27
Sitemap


Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/warmbell/public_html/site-map.php on line 29

any ideas?
Warmbells is offline   Reply With Quote
Old 12-14-2004, 02:01 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Make sure define('PHPDIG_DB_PREFIX','prefix'); matches what is in the PhpDig connect.php file.
__________________
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 12-14-2004, 02:26 PM   #7
Warmbells
Green Mole
 
Join Date: Sep 2004
Posts: 19
Thanks again,

Working okay now, I won't have to do a seperate sitemap anymore, just one thing is it possible for the text shown (page title?) to be more than about 23 characters as the page titles are truncated such as

The duck pond at ...
Membership Applic...
Home Page of Anim...

Thanks for a terrific program

Gerald
Warmbells is offline   Reply With Quote
Old 12-14-2004, 02:49 PM   #8
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Replace:
PHP Code:
if (strlen($words[0]) > 20) {
    
$part_words substr($words[0],0,17)."...";
}
else {
    
$part_words $words[0];

With:
PHP Code:
$part_words $words[0]; 
__________________
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 12-15-2004, 02:30 PM   #9
Warmbells
Green Mole
 
Join Date: Sep 2004
Posts: 19
As it is working okay for me now I have just one more question, how would I insert it into an html page so that it would look like it was part of the site? I would like it to look like the site search page is at the moment http://www.animals-in-distress.net/site_search.htm

Gerald
Warmbells is offline   Reply With Quote
Old 12-15-2004, 05:55 PM   #10
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Are you asking how to add a phpdig search to another web page? If so, have a look at post #8 in this thread.
vinyl-junkie is offline   Reply With Quote
Old 12-16-2004, 12:42 AM   #11
Warmbells
Green Mole
 
Join Date: Sep 2004
Posts: 19
No, I want to add a site map based on the database the code is working okay but I'm not sure how to take my site template and then call the site map php code to display in the middle of the page. I know I'll have to remove the <html><body> and </body></html> tags from charters code but I'm so new I'm foxed as to what to do next.

Gerald
Warmbells 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
Sleep in the code davids211082 How-to Forum 2 05-18-2005 11:22 PM
Php code in results 1001studio How-to Forum 7 12-03-2004 09:42 PM
Affiliate code JPSSAU How-to Forum 1 06-19-2004 05:51 AM
Code Requests Charter Feedback & News 0 02-28-2004 11:45 PM
Documented code alivin70 Mod Submissions 1 10-06-2003 02:34 PM


All times are GMT -8. The time now is 10:15 AM.


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