FAQ: Webmaster
|
This page describes FAQ questions asked by webmasters. |
ERRORS
Where is the util.php file?
> Warning: main(util.php): failed to open stream: No such file or directory in /home/mddir/public_html/phpyellow/index.php on line 1
> Fatal error: main(): Failed opening required 'util.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mddir/public_html/phpyellow/index.php on line 1
The Install Helper asks you to rename util-dist.php to util.php . This is a check to make sure you have entered your database connection data. One cannot simply click thru the install script, one must actually enter the database connection values into util-dist.php, rename as util.php and save and upload this file to the server.
What does "failed to open stream: No such file or directory" mean - and how do I resolve it?
> Warning: main(/www/phpyellow/templates/left.php):
> failed to open stream: No such file or directory in
> /usr/local/apache/htdocs/phpyellow/templates/header.php on line 26
Failed to open means the specified file could not be located. Either the file is not there, or else the INSTALL_DIR is incorrect. The solution is normally to edit util.php and enter the correct INSTALL_DIR. This is the absolute server path from root to the folder you installed into.
EDIT
Can I edit phpYellow with my favorite HTML editor?
In general, yes you can edit phpYellow source code using your favorite editor. Always make a backup copy first. That way you can always restore to your last working state.
Tip: do not use Microsoft editors because frequently they add unnecessary code or even change the php source code without you knowing.
I used my HTML editor and now my directory no longer works, what do I do?
Upload a fresh file from the distribution package.
How do I know what files to edit?
Many customizable files are found in the /templates folder.
Use the SHOWFILENAMES feature to have your directory display filenames and included filenames. You can toggle this feature on or off in administration. Login to admin, then Setup > Edit Configuration > Site administrator settings > show filenames > on. Displays or does not display filenames and some included filenames. Useful for page edit when you need to find the name of an included page. The display of the name is configurable (for example to a small font size) by editing the CSS file called generic.css and the class object called filename. Set show filenames > off for live production use.
How do I use the horseshoe page layout?
Using the horsehoe layout requires PHP programming knowledge. When activated this structure looks like a horseshoe with a distinct top, left and right shape. Almost every page contains a table structure. The table has at least one table row with 3 table cells. The core application content is placed in the middle table cell by default and should not be changed. The files left.php and right.php are included in the left and right table cells, and you may find these commented out with 2 forward slashes. The left.php and right.php are intended to contain or to be replaced by your own code or file/s.
For example, in the case of the page called recent.php if the comment is removed
//include("templates/left.php");
... by removing the 2 leading slashes ... then the file left.php will show. You may edit left.php or right.php to suit your tastes. Alternatively, you can delete this line and paste in your own custom code for this page. As a result, the horseshoe structure lets you custom tailor html/PHP content for the left and right sides of most pages.
IMAGES
How can I enable the display of logos or images in my directory?
Images and Logos are turned on or off by the webmaster by logging into admin > Setup > Edit Configuration > Image settings > use images > on ... then Submit.
How do I change the uppermost banner seen at the top of every page?
To change the banner:- put your new banner into images/
- save new file as header.jpg overwriting old file
- edit /templates/header.php
- replace the src width and height with your new values
- save header.php and upload to /templates
One of my images is scrambled and doesn't appear correctly, what should I do?
Sometimes the image is corrupted being transferred from your local workstation to the web server. Sometimes that process can result in a scrambled image. The resolution is to get a fresh image copy and upload the fresh image to the web server. Then test to see if that works.
The effect of this upload can be sometimes obscured by your browser and or web server cache which still may show an old image even if a new image exists. The solution in these cases is to use another browser type - example Netscape instead of IE - or remove the cache from your existing browser using Tools > Options > Temporary Internet Files > Delete , and then close your browser and reopen the URL with a new browser.
If all else fails then delete the image, then browse the page the image is on until the image no longer shows (except for the text placeholder), then upload the fresh image, close your browser, open your browser and load the page again.
DATABASE
How do I get all the listing data for my phpyellow pages?
The software is installed by you and this creates a handful of test records. The real data is added by you and or your customers.
We also offer data services where we can preload your directory with 1,000's of records, inquire for details.
What tables and fields are used in the database?
For security resaons we will not publish this data online. Check your admin folder for details.
PAYMENT
Is there a particular area in the admin section to configure the payment options?
Login to the admin area and use Setup > Edit Configuration > Payment settings and submit.
What payment gateways can I use?
phpYellow Pro is installed with the Paypal gateway as default. Other gateways can be added for an additional fee. Inquire for details.
Also see api.php which describes how to integrate phpYellow with any gateway processor.
SEARCH RESULTS
How does your yellow page db do with search engine rankings?
phpYellow indexes excellently with Google.com.
For example, use http://www.google.com and enter the search word: phpyellow
How do I optimize phpYellow for search engines?
Search engine optimization is a huge subject. Look here for more information: http://www.searchenginewatch.com. Pay special attention to the title and meta tags of each phpYellow page and customize to suit. You may also want to look at optimizing the way your server represents web addresses, by looking at Apache's mod_rewrite or other similar tools such as ForceType.
What happens if someone searches and the results yield 100 results? Are all 100 results listed on one page or is their some way you can control how many listings appear on a page before the users has to click a next button?
As webmaster you set the RECORDSPERPAGE. Do this by:
Login to admin > Setup > Edit Configuration > General directory settings > records per page
We suggest a maximum RECORDSPERPAGE value of 10. Many users won't bother to scroll.
How do I pass querystring variables to the main search?
http://phpyellow.com/demo/search4needles.php?haystack=category&needle=pizza
http://phpyellow.com/demo/search4needles.php?haystack2=category&needle2=pizza
http://phpyellow.com/demo/search4needles.php?haystack3=category&needle3=pizza
http://phpyellow.com/demo/search4needles.php?haystack4=category&needle4=pizza
Haystacks thru haystack4 are column (aka field) names. The $needle is the string you are looking for. The haystack number and needle number should match for related data.
In the example the haystack called category is used. You may substitute any table column in the account or listing tables, for example, $organization or $lastname or1 $zipcode or ...
LISTINGS
How do I get a listing to show up under multiple categories?
Login to the client control panel, click 'Add Listings' and submit.
Do I have control over the order that the listings appear in?
Yes you have control over the order that the listings appear in. However, the application is built to show paid listings first, and this should not be changed. The listing types are ordered by default. A sponsor listing will always come first, followed by minipage, gold, silver and bronze. You can rename the listing types. You can remove unwanted listing types.
By choosing bronze, silver or gold [or other] listing types you are accessing the number value of the variable called $rank. Rank of 0 is bronze by default. The logic of the application has a different listing template shown for each different listing type.Default listing rank values
rank number Sponsor 4 Minipage 3 Gold 2 Silver 1 Bronze 0
How do give my customers a default silver (or higher) listing - instead of the default bronze listing?
Change the database and change the display template:
Change the database
The default rank for listings added to your directory is the number 0. To make all new listings start at a higher rank change the rank to a higher number. You may do so by pasting this code into EasySQL as accessed from admin > EasySQL
ALTER TABLE pyd_listing CHANGE rank rank TINYINT(1) UNSIGNED NOT NULL DEFAULT 1
Use a higher number to set a higher default. Acceptable range is 0 through 2:
Change the display template
Use /templates/universal_display.php and change the number at which a conditional display of data is made.
How do I set all existing directory listings to another rank?
Login to admin > EasySQL and submit this code:
UPDATE pyd_listing SET rank=1
How do I change formatting and address data in listings shown in searches?
Edit /templates/universal_display.php
How can the website link NOT open a new window?
The website link new window is made by the code target="_blank" (or its php equivalent). To remove the new window remove the code target="_blank" from each link.
How or where can I edit the map link to do a target="_blank"?
The map link can be modified to open in a new browser window. To do so use this link code:
target="_blank"
How do I remove "*Test becomes Gold" ?
This is just a temporary testing option. To remove, to to admin.php, Setup > Edit Configuration > Listing types and uncheck the Test listing type, and Submit.
Tell me more about the Minipage feature?
The mini webpage is considered experimental and the code is offered on an "as is" basis. PHP programming capability is required to use this feature. Some production sites use the Mini Web Page as a key selling point for their directory. More info: http://phpyellow.com/demo/mwp/index.php
ADMINISTRATION
How do I approve new listings?
Login to /manager, locate the listing and use the status control. Here is a picture describing what some of the webmaster controls do:
MISCELLANEOUS
How do I reset my admin username or password?
You can reset your password by:- ftp util.php to your local machine
- make a backup util.php and put it somewhere safe
- find these CONSTANTS:
define("ADMINUSER", "change_this");
define("ADMINPASSWORD", "change_this");
- enter your new user and password where it says 'change this'
- ftp saved util.php file back to your web server
- if there was some error (for example in saving the new util.php file) you can always upload your backup again to restore to your last working state.
What more can I do to make my directory "production" ready?
Here is a quick checklist of items to review before you go live:- do a final review of Setup > Edit Configuration in particular for > General directory settings but review all settings and submit
- optionally use only a valid webmaster and system email no-reply@yourdomain.com address as configured in administration Setup > Edit Configuration > Email notification settings
- add a listing just like a customer would - is all ok?
- update a listing including image upload - is all ok?
- verify you are receiving appropriate email for these actions as both customer and webmaster
- use all the searches - do they give correct results? For example, when you do a search does each listing type show the data you want for that listing type?
- if used - upgrade a listing (pay for one listing type to be improved to another, use the Test listing type)
- remove the Test listing type admin > Setup > Edit Configuration > Listing types offered, make sure all your prices are right (expressed annually), submit
Can phpYellow show sub-categories?
The categories in phpYellow are unique QuickSearchTM categories. All are available at the top level, there are no sublevels. This returns faster searches and improved performance. All categories are on the top level and are immediately searchable with immediate and meaningful search results:Travel Travel - North America Travel - North America - California Travel - North America - Florida Travel - North America - Florida - Airlines Travel - North America - Florida - Bus Travel - North America - Florida - Car
The administration has a point and click module which lets you add, edit or remove any category. Edits to existing categories with existing data automatically update all affected records with the new category name.
How do I remove the return link in the footer?
- first purchase permission, more info: http://www.globalissa.com/showcase.php?n=1&p=19
- Open templates/footer.php
- edit to suit your preferences
- save and upload to /templates folder
- the license requires a return link which may be removed with a nominal fee
I have listings that are expiring on my phpYellowPages Pro. Are the contacts automatically notified their listing has expired or do I need to do something to let them know?
Be sure to use 'Manual Expire' to manually exire the status of the listings, then send mail:
4.x and higher
For 4.x and higher versions there is an email notification module. All you do is point and click. The application notifies by email for you.
How can I quickly remove all the default categories?- Login to admin
- click easysql button
- paste in this command
DELETE FROM pyd_category_popular - click on 'Run my command'
How do I manually add listings for admin and set them to never expire?
1. use the quick submit function to manually add listings for admin
2. to never expire: To apply a "never expire" for ALL listings go admin > Edit Configuration > General directory settings > and set days to expiry to a high value, example: 7300
Note: to never expire use a value for 10 or 20 years - either 3650 or 7300. Some web servers default to a date in the past (1969) if you enter a high number value. This will result in the listing never showing. If you find this happening to you then lower the number of days to expiry.
EMAIL
Which file contains the verbiage for the confirmation emails that are sent to a "New User" or a User that upgrades their account?
New user (and miscellaneous tasks) email: see email_notify.php
Invoice sent: see /modules/payment/buy.php
Why doesn't the email work?
Make sure that you have configured the application to send email. Log in to administration, review and submit the Email notification settings found in admin > Setup > Edit Configuration > Email notification settings. For example, notify customer > on . The file email_notify.php performs user login emailing, the checkout invoicing is performed in /modules/payment/buy.php and some administrative triggered mailing is performed in admin/send_notifications_action.php
Why was an email returned as failed?
Delivery failed is not a phpYellow error. If the delivery failed it means that phpYellow DID send the note, but some other reason accounts for why the note did not reach its intended recipient. Possible reasons for undeliverable mail include an undeliverable address, a full mailbox or other 3rd party mail errors.
Can I send an e-mail to all the sites members?
The admin > Communication > Send Notifications module allow you to reach site customers before or after their listing has expired. Each customer has the ability to set their own notification preferences. The webmaster has the abiltiy to override customer notification preferences. Also see the Email Broadcast module which lets you email members directly with your own content.