Wordpress Integration & Plugin
WordPress 2.6 Integration (template-based)
WordPress 2.6 Integration (file-based)
Super-Duper WordPress 2.6 Integration
Wordpress 2.6 Integration (template-based):
- Uncomment the following in your conf.inc.php file and remember to change the path to *your* site:
// require_once(’/path/to/your/wp-config.php’);
- In the templates section in your admin control panel add this in the header (remember to change the path
to *your* site):<?php define('WP_USE_THEMES', false); require('/path/to/your/wp-blog-header.php'); get_header(); ?>
- Change /path/to/your/wp-blog-header.php to the full path to your WordPress wp-blog-header.php file.
- In the templates section in your admin control panel add this in the footer:
<?php get_footer(); ?>
- That’s basically it.
Wordpress 2.6 Integration (file-based):
- Uncomment the following in your conf.inc.php file and remember to change the path to *your* site:
// require_once(’/path/to/your/wp-config.php’);
- Assuming you’ve created the header and footer files that will be uploaded to the /includes/cache/ folder you need to put the following into the header.php (or whatever it is called, must be a php file) file:
<?php define('WP_USE_THEMES', false); require('/path/to/your/wp-blog-header.php'); get_header(); ?>
- Change /path/to/your/wp-blog-header.php to the full path to your WordPress wp-blog-header.php file.
-
Put the following into the footer.php (or whatever it is called, must be a php file) file:
<?php get_footer(); ?>
- Upload the two files into your phpFan /includes/cache/ folder.
- Remember you need to have gone into your phpFan admin control panel and gone to Settings -> Addon Settings and changed the header/footer settings for whatever phpFan Addon you have to the name of your header/footer files. Only put the file name.
- That’s about it.
Super-Duper Wordpress 2.6 Integration:
The following lets you add phpFan directly into Wordpress instead of the other way around. Say, you want to add phpFan into a Wordpress page (if you’ve allowed php includes in your pages) or want to add random/last joined into your header template (if you have the phpFan Wordpress Addon).
MAIN PHPFAN:
<?php include '/path/to/your/phpfan/conf/file/conf.inc.php'; $type = 'phpfan'; include $includepath .'/phpfanmore.php'; ?>RANDOM LATEST:
<?php phpfan_get_any('/path/to/your/phpfan', 'latest', numberofjoined, numberofjoinedperrow); ?>RANDOM JOINED:
<?php phpfan_get_any('/path/to/your/phpfan', 'random', numberofjoined, numberofjoinedperrow); ?>
phpFan Wordpress Plugin
The phpFan Wordpress plugin is available for download.
Overview:
phpFan is a PHP/mySQL script designed to help you maintain links (either image or text) to listings (fan or hate) you’ve joined. The
phpFan Wordpress plugin allows individuals to display the latest and random joined listings easily into their Wordpress templates.
Requirements:
PHP (version 4.3.11 or higher)
MySQL (version 4.1 or higher)
Features:
- - latest and random joined listings displayed easily through a plugin
Installation:
- Unzip the package into an empty directory.
- Upload phpfan-plugin.php in your Wordpress plugins directory.
- Add the following where you want to add the latest/random into your Wordpress templates. Remember to put 5 - or
whatever other number where it says numberofjoined if you want 5 joined to show up. Remember to put 2 - or whatever other number - where it says joinedperrow if you want 2 joined per row.RANDOM LATEST:
<?php phpfan_get_any('/path/to/your/phpfan', 'latest', numberofjoined, joinedperrow); ?>
EXAMPLE:
<?php phpfan_get_any('/path/to/your/phpfan', 'latest', 4, 2); ?>
RANDOM JOINED:
<?php phpfan_get_any('/path/to/your/phpfan', 'random', numberofjoined, joinedperrow); ?>
EXAMPLE:
<?php phpfan_get_any('/path/to/your/phpfan', 'random', 4, 2); ?>