vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Last 10 posts outside of forum? (https://vborg.vbsupport.ru/showthread.php?t=62044)

krohnathlonman 02-29-2004 10:42 PM

Last 10 posts outside of forum?
 
I saw the mod to attatch this to the forumhome but NOT an external page.

ANybody got it? Basically just want to include the php file.

mr_fox 03-01-2004 04:53 AM

PHP Code:

<?php
$xmlstr 
implode('',file("http://site/forum/external.php?type=RSS2")); 

$dom domxml_open_mem($xmlstr); 
$root $dom->document_element(); 
$root_childs $root->child_nodes(); 

foreach(
$root_childs as $root_child

    if(
$root_child->node_name() == 'channel'
    { 
                 
$sec_childs $root_child->child_nodes(); 

                 foreach(
$sec_childs as $sec_child
                 { 
                     if(
$sec_child->node_name() == 'item'
                     { 
                             
$thr_childs $sec_child->child_nodes(); 

                             foreach(
$thr_childs as $thr_child
                             { 
                                 if((
$thr_child->node_name() == 'title') && ($thr_child->node_type() == 1)) 
                                     { 
                                             
$curr_thread['title'] = iconv("UTF-8","WINDOWS-1251",$thr_child->get_content()); 
                                     } elseif((
$thr_child->node_name() == 'link') && ($thr_child->node_type() == 1)) 
                                     { 
                                             
$curr_thread['link'] = iconv("UTF-8","WINDOWS-1251",$thr_child->get_content()); 
                                     } elseif((
$thr_child->node_name() == 'description') && ($thr_child->node_type() == 1)) 
                                     { 
                                             
$curr_thread['description'] = iconv("UTF-8","WINDOWS-1251",$thr_child->get_content()); 
                                     } elseif((
$thr_child->node_name() == 'guid') && ($thr_child->node_type() == 1)) 
                                     { 
                                             
$curr_thread['guid'] = iconv("UTF-8","WINDOWS-1251",$thr_child->get_content()); 
                                     } elseif((
$thr_child->node_name() == 'author') && ($thr_child->node_type() == 1)) 
                                     { 
                                             
$curr_thread['author'] = iconv("UTF-8","WINDOWS-1251",$thr_child->get_content()); 
                                     } elseif((
$thr_child->node_name() == 'source') && ($thr_child->node_type() == 1)) 
                                     { 
                                             
$curr_thread['source_url'] = iconv("UTF-8","WINDOWS-1251",$thr_child->get_attribute('url')); 
                                                 
$curr_thread['source'] = iconv("UTF-8","WINDOWS-1251",$thr_child->get_content()); 
                                     } 
                             } 

                             
$forumthreads[] = $curr_thread
                             unset(
$curr_thread); 
                     } 
                 } 
    } 
}
?>


mcncyo 03-01-2004 11:44 AM

I am also trying to use this code, but am having a problem with it. I am getting this error message

Fatal error: Call to undefined function: domxml_open_mem() in /home/website/public_html/include/last10post.php on line 4

krohnathlonman 03-01-2004 04:29 PM

not working here either.... is that a PHP5 function maybe?

mr_fox 03-01-2004 05:10 PM

yeah... php5

krohnathlonman 03-17-2004 06:06 PM

is there a PHP4 way to do this? I'd rather not install 5 yet

Brad 03-17-2004 06:25 PM

mr_fox,

You are currently showing up as unlicensed. To be able to download hacks and/or receive support here at vBulletin.org, we ask you to please click here (vB-germany users click here) and enter your email address, to show us that you are licensed.

You will need to use your customer number and password (which will be in the email you got when you paid for your license) to access that page. Please note that your email is case sensitive.

Thank you.

krohnathlonman 03-17-2004 06:38 PM

I'm the one asking for help, I'm licensed :)

RobinHood 03-18-2004 06:08 AM

Quote:

Originally Posted by krohnathlonman
I'm the one asking for help, I'm licensed :)

Here you go:

https://vborg.vbsupport.ru/showthrea...432#post486432


All times are GMT. The time now is 02:58 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.01234 seconds
  • Memory Usage 1,761KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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