Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Did it work?

    Which version of the business directory are you using?
    If you’re running version 0.8.3 the changes below will allow you other URL’s. I don’t know if this change will still work in 0.8.4, however I looked at the code and I think it should work just fine. Good luck and let me know if this change will handle all the URL’s you’re going to throw at it.

    The current implementation only allows very basic website URLs.
    Unfortunately not everyone has a top-level domain

    For example these URLs are not allowed in version (0.8.3 Beta):

    https://www.somesite.com/
    https://www.somesite.com/some-url-path/
    https://www.somesite.com/some_url_path/index.html

    A quick fix for this is to find this string in “functions.php”

    /^http{1}s?:{1}\/\/{1}[A-z0-9]+[A-z0-9\-\.]*\.{1}[A-z]{2,4}$/

    and replace it with

    /^http{1}s?:{1}\/\/{1}[A-z0-9]+[A-z0-9\-\.]*\.{1}[A-z]{2,4}(\/([a-zA-Z0-9\.\-_])+)*(\/){0,1}$/

    This will support the URLs above

    I’m running 0.8.3 without any issues.
    Please note though that I never upgraded to 0.8.4 due to that people listed issues with that release.

    I haven’t tried the latest version yet. I’d stick to 0.8.3 for now.
    Have you tried to clear your cache? Sometimes that will help.

    Thread Starter btaz

    (@btaz)

    Cats Eye Design,

    It’s because in this file:
    in https://www.pscacoaches.org/wp-content/themes/thesis_16/custom/layout.css

    the width in this tag was set to 45%

    .format_text input, #commentform input, #commentform textarea {
       ...
       width: 45%;
    }

    A smaller number like 25% would fix the issue but the way it’s currently setup the text edit field and the search button are both affected by the same width setting which I’d think is not very desirable.

    Thread Starter btaz

    (@btaz)

    I’m happy it worked. I haven’t upgraded to 0.8.4 yet. Did you use it with 0.8.3 or 0.8.4?

    Thread Starter btaz

    (@btaz)

    Additional Improvements. The complete address is displayed, plus a link that opens up the address in a Google map.

    ———————————————————————-
    Some Business Name (Hyperlinked URL using a big font)
    Address line 1
    Address line 2
    City
    State, ZIP

    Description … lengthy description text is shown here …

    Phone: (555) 123-4567 Email: [email protected] (Show on map)
    Website: https://www.some-website.com
    ———————————————————————-

    Note: Before attempting this please make sure to backup “main.css” and “functions.php”. This will also be very helpful just in case you don’t like the new look and feel. I tried to be as faithful to the original version as possible.

    ===================================================================================================
    File: main.css
    ===================================================================================================
    Find: .bizdir_linked_title {
    After: }
    Add:
    
    /*
    *  Alternate Directory Styles
    */
    div.bizdir_list {
    	width: 100%;
    }
    
    div.bizdir_list div.bizdir_listing {
    	border-bottom: 1px solid #999999;
    	padding-top: 0.6em;
    	padding-bottom: 0.9em;
    }
    
    div.bizdir_list div.bizdir_listing:hover {
    	background: #F0EADA none repeat scroll 0 0;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_title {
    	margin-bottom: 0.1em;
    	font-size: 1.3em;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_title A:link,A:active,A:visited {
    	color: #000000;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_address {
    	font-size: 0.9em;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_description {
    	margin-top: 0.4em;
    	font-size: 0.9em;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_contact {
    	font-size: 0.9em;
    	margin-top: 0.4em;
    	margin-bottom: 0.1em;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_contact A:link,A:active,A:visited {
    	color: #000000;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_website {
    	font-size: 0.9em;
    }
    
    div.bizdir_list div.bizdir_listing div.bizdir_website A:link,A:active,A:visited {
    	color: #000000;
    }
    ===================================================================================================
    File: functions.php
    ===================================================================================================
    Find: //Display Listings
    Delete all rows between:
        //Display Listings
    And:
        //Add Footer Pagination
    
    Add this after: //Display Listings
    
    	$directory .= "<div class='bizdir_list'>";
    	if(!empty($searchTerms))
    		$directory .=
    			"<div style='text-align:center;padding:5px 15px 10px 15px;'>".
    				"<b>Search results for: \"$searchTerms\"</b>".
    				"<small><a>View Entire Directory</a></small>".
    			"</div><hr/>"
    		;
    	foreach($listings as $l) {
    		$directory .=
    			"<div class='bizdir_listing'>".
    			"<div class='bizdir_title'>".
    				(empty($l["company_url"])?
    					str_replace("&Acirc;&","&",@$l["company_name"]):
    					"<a rel='nofollow' href='".$l["company_url"]."'>".
    						str_replace("&Acirc;&","&",@$l["company_name"]).
    					"</a>"
    				).
    			"</div>";
    		if(!empty($l->company_street1))
    			$directory .= "<div class='bizdir_address'>".@$l["company_street1"]."</div>";
    		if(!empty($l->company_street2))
    			$directory .= "<div class='bizdir_address'>".@$l["company_street2"]."</div>";
    		if(!empty($l->company_city))
    			$directory .= "<div class='bizdir_address'>".@$l["company_city"]."</div>";
    		if(!empty($l->company_state) || !empty($l->company_zip))
    			$directory .= "<div class='bizdir_address'>".@$l["company_state"]." ".@$l["company_zip"]."</div>";
    		if(!empty($l->company_description))
    			$directory .= "<div class='bizdir_description'>"."<p>".str_replace("&Acirc;&","&",$l["company_description"])."</p>"."</div>";
    		$directory .= "<div class='bizdir_contact'>";
    		if(!empty($l->company_phone))
    			$directory .= "Phone: <strong>".@$l["company_phone"]."</strong> &nbsp; ";
    		if(!empty($l->company_email))
    			$directory .= "Email: <a href='mailto:".@$l["company_email"]."'>".@$l["company_email"]."</a> &nbsp; ";
                    if(!empty($l->company_city) && !empty($l->company_state) && !empty($l->company_street1))
    			$directory .= "<a rel='nofollow' href='https://www.google.com/maps?q=".@$l["company_street1"]."+".@$l["company_city"]."+".@$l["company_state"]."+".@$l["company_country"]."'>"."(Show on map)"."</a>";
    		$directory .= "</div>";
    		if(!empty($l->company_url))
    			$directory .=  "<div class='bizdir_website'>Website: <a href='".str_replace("&Acirc;&","&",$l["company_url"])."' rel='nofollow'>".str_replace("&Acirc;&","&",$l["company_url"])."</a></div>";
    		$directory .= "</div>";
    	}
    Thread Starter btaz

    (@btaz)

    Update with minor graphical improvement

    In main.css replace:

    div.bizdir_list div.bizdir_listing {
    	border-bottom: 1px solid #999999;
    	padding-bottom: 0.6em;
    	margin-top: 0.6em;
    	margin-bottom: 0.6em;
    }

    with:

    div.bizdir_list div.bizdir_listing {
            border-bottom: 1px solid #999999;
            padding-top: 0.6em;
            padding-bottom: 0.9em;
    }
Viewing 8 replies - 1 through 8 (of 8 total)