Wordpress Integration
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 (for phpFan Joined Addon) into your header template (if you’ve downloaded the phpFan Wordpress plugin.
Remember you may need to change the path to config.inc.php to the full path.
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); ?>AFFILIATES:
<?php include './includes/conf.inc.php'; $type = 'affiliates'; include $includepath .'/affiliatesmore.php'; ?>KEEP-IN-MIND:
<?php include './includes/conf.inc.php'; $type = 'keepinmind'; include $includepath .'/keepinmindmore.php'; ?>JOINED:
<?php include './includes/conf.inc.php'; $type = 'phpfan'; include $includepath .'/phpfanmore.php'; ?>LISTING:
<?php include './includes/conf.inc.php'; $type = 'list'; include $includepath .'/listmore.php'; ?>WISHLIST:
<?php include './includes/conf.inc.php'; $type = 'wishlist'; include $includepath .'/wishlistmore.php'; ?>