vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Wordpress blogs on forum home (https://vborg.vbsupport.ru/showthread.php?t=162174)

parabat 11-07-2007 11:24 PM

Wordpress blogs on forum home
 
I'm hoping someone could assist me please.
I'm not PHP wise and want to display my latest wordpress blog entries on my forum home in a separate stats box. Much like this mod https://vborg.vbsupport.ru/showthread.php?t=156652 but using the wordpress blogs.
My wordpress (v2.2) and vBulletin (v3.6.4) have separate databases. Usually the forum users don't view the blogs on the homepage, hence me trying to display them in the forum so they become more visible.

I understand the general idea how to do it, but have no clue how to actually write the PHP code. I had a look at this code, but it's not opening a different database which has me stumped. I guess Wordpress also uses different database fields etc.

So any help at all would be greatly appreciated.

Thanx in advance

-PB

parabat 11-13-2007 10:18 PM

*bump*

Any takers???

-PB

WhaLberg 11-14-2007 03:31 AM

PHP Code:

$db->select_db("wpdb");
$wpposts $db->query_read("SELECT post_ID, post_title FROM wp_posts ORDER BY id DESC LIMIT 0,10");
while (
$wppost $db->fetch_array($wpposts))
{
echo 
'<a href="blogdir/?p=' $wppost['post_ID'] . '">' $wppost['post_title'] .'';


Will help you. But do some search on templates.


All times are GMT. The time now is 08:48 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00939 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete