www.uburst.com www.uburst.com

"Making the HTML work in Frames & logo"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

Modify uDirectory Scripts
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Making the HTML work in Frames & logo"
Posted by kfildes on Mar-21-02 at 03:05 PM (EST)
I just installed the uDirectory software, which I first off want to say was very easy to do (BRAVO!). I have a few simple questions, though.

I am generating my site in frames and the particular frame that the directory will load into is about 450 pixels wide. The table layout of your default settings are too wide, so I would like to replace the hard coded pixel width tags with percentage tags instead. Is this fairly easy to do, and if so, how creative can I be in changing the HTML layout (I for instand, would like to see the city, state and zip of a listing display on one line rather than three to save horizontal space.

Also - can I turn off the image display or set it to NONE on the listings pages so that the search areas are not pushed so far to the right?

Just wanted to check with you before I went in and mucked around too much.

Thanks!

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Making the HTML work in Frames ..., Bill Weiner, Mar-22-02, (1)
Thanks!!, Karen, Mar-22-02, (2)
Can't get it to work, Karen Fildes, Mar-22-02, (3)
RE: Can't get it to work, Bill Weiner, Mar-24-02, (4)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Making the HTML work in Frames & logo"
Posted by Bill Weiner on Mar-22-02 at 06:46 AM (EST)
Assuming that you are using the Deluxe version of uDirectory (otherwise let me know if you are using the Business or Personel edition and I will send instructions for those versions)... here are some instructions for customizing the format of the listing HTML:

STEP 1: Make a backup of your current udirectory.pl script... just in case.

STEP 2: Open your "udirectory.pl" script with any TEXT editor such as WordPad.

STEP 3: Do a search on the following line:

sub get_listing_html

... This will get you to the start of the subroutine that generates the HTML for each listing.

STEP 4: The loop in that subroutine that starts with the line:

for ($i = 0; $i < 20; $i++)

.... is where the (up to 20 configurable) fields are output. Within that loop, you would want to add a couple "if" statements around the "< br >" lines like this:

if ($i != 5)
{
$new_listing .= "< br >\n";
}

.... where "5" actually corresponds to the index of whichever field you don't want the < br > after.

STEP 5: While also editing that subroutine, you should also see where the WIDTHs are set... and where the images are displayed. Although, if you don't want the images at all, then on the uDirectory Deluxe Control Panel - under Configure Listings - you can set the "Listing Layout" to be "No Image" and then no image will be displayed.

STEP 6: Save the script... as TEXT if your editor asks... and try it out!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "Thanks!!"
Posted by Karen on Mar-22-02 at 08:50 AM (EST)
Thanks Bill ... I spent last night making a number of simple HTML format changes to work better within the frames and it was VERY easy -- I really am very happy with this script. I want to get the layout of the address fields (no breaks) taken care of next and was so thrilled to see your response this morning. Thanks again.

I have one problem that I need to address, and that is the fact that my emails don't seem to be generated when a new listing is added. But I haven't spent too much time checking that one yet.

Also - another question. When a user adds a listing with a password, does the administrator have the ability to edit and delete that entry. My first response was "of course", but I want to make sure

Thanks again ...

Karen

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "Can't get it to work"
Posted by Karen Fildes on Mar-22-02 at 02:22 PM (EST)
Bill:

I have tried the "if" statement you suggested (in order to keep the tags from displaying between the cuity, state, zip) but must be doing something wrong. The line I modified was:

{
$new_listing .= $gFields[$i] . "\n";
}


and I changed it to this (field 4 is State):

if ($i != 4)
{
{
$new_listing .= $gFields[$i] . "\n";
}
}

But when I ran the file the state disappeared altogether. Can you tell what I did wrong?

Thanks!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "RE: Can't get it to work"
Posted by Bill Weiner on Mar-24-02 at 09:47 AM (EST)
The "if" statement should only control whether the "< BR >" is output or not. But you should always have the $gFields[$i] part output. So the "if" statement should be something like this:

$new_listing .= $gFields[$i] . "\n";
if ($i != 4)
{
$new_listing .= "< BR >";
}

... with only the "BR" part inside the "if" clause.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.