uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
Making the HTML work in Frames & logo

Knowledge Base Lobby : uDirectory Support Conference : Modify uDirectory Scripts
Dec-18-17 05:51 AM EST
Original Message
Making the HTML work in Frames & logo
Author kfildes on 03-21-2002 at 15:05 (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!
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Making the HTML work in Frames & logo Bill Weiner, 2002-03-22 06:46:34 (1)
            Thanks!! Karen, 2002-03-22 08:50:59 (2)
                 Can't get it to work Karen Fildes, 2002-03-22 14:22:47 (3)
                      RE: Can't get it to work Bill Weiner, 2002-03-24 09:47:45 (4)

Messages In This Discussion
         1. RE: Making the HTML work in Frames & logo
        Author Bill Weiner on 03-22-2002 at 06:46 (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!
TABLE OF CONTENTS
                 2. Thanks!!
                Author Karen on 03-22-2002 at 08:50 (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
TABLE OF CONTENTS
                         3. Can't get it to work
                        Author Karen Fildes on 03-22-2002 at 14:22 (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!
TABLE OF CONTENTS
                                 4. RE: Can't get it to work
                                Author Bill Weiner on 03-24-2002 at 09:47 (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.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.