Member Log In
Site Navigation
Latest Modifications
- [vB 3.6.x] StopSpam
By: flappi282 - [vB 3.8.x] vBulletin Chat Addon for...
By: 123flashchat - [vB 3.5.x] 404 Page Redirect To...
By: Ak Worm - [vB 3.8.x] 404 Page Redirect To...
By: Ak Worm - [vB 4.0.x] 404 Page Redirect To...
By: Ak Worm
Latest Template Mods
- [vB 3.8.4] Images PassWordBox...
By: cRs!MP - [vB 3.8.4] Footer Follow Ups
By: Ak Worm - [vB 3.7.2] Worldofwarcraft blue...
By: Mikeyodesigns - [vB 3.7.0] My Links
By: blind-eddie - [vB 3.7.0] Pop-Up Warning Before...
By: Thelonius Beck
Latest Styles
- [vB 3.8.4] CompletevB - Skylight
By: DreadKnight - [vB 3.8.3] [vB 3.8.4] Barcelona...
By: hoiquantinhoc.com - [vB 3.8.3] Natures Walk by vBSkin...
By: Chri5 - [vB 3.8.3] Green Theme
By: Robdog - [vB 3.8.2] Unreal T 3 - vB3.8.x
By: Butcher
Latest Graphics
- [vB ] [anim.]Team Ranks
By: cRs!MP - [vB ] Abstract Circles (3...
By: cRs!MP - [vB ] PlayStation Rank Images
By: cRs!MP - [vB 3.6.12] Heavy Stroked Button...
By: Shelley - [vB ] Minature Ranks.
By: Shelley
vBulletin Modifications »
Support Center »
vBulletin Support »
Modification Coding »
Miscellaneous Hacks - HTML email using vB: problem with a javascript file
![]() |
| | #11 | |||||||||
Location: Israel Age: 29 ![]() |
Status: Offline In general, from a basic check i did the xml structure should be as follows: Code: <item> <title> </title> <link> </link> </item> PHP Code: 1. In the code above i've using remote fetching using fopen(). 2. the simplexml_load_string() functions takes xml string & convert to xml object we can later "travel" on xml tree. I havent tested the above code - but it should work & do the job for you. This should output the html you need for your mailer. In general you have 2 options: option a] open this php into new window, then copy the html & paste into the mailer inside admincp. option b] make some code that generate the admincp mailer page ready to submit. Hope this helps you Regards, Idan. * Support will only be given via forums ! * If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here Last edited by Idan; 07-05-2009 at 08:09 PM. | |||||||||
|
| | #12 |
| |
Status: Offline Thank you Idan. Using that code on a .php file like this: Code: <div class="smallfont">
<?php
$url = "http://www.vb-italy.org/external.php?forumids=73,74&type-rss";
$fp_url = fopen("$url",'r');
$xml_raw_data = fread($fp_url,20480); // Read up to 20k of xml data
fclose($fp_url)
$xml_root = simplexml_load_string($xml_raw_data);
// Now loop all "items" childs nodes
foreach ($xml_root->item as $item_node){
echo "<img class=\"inlineimg\" style=\"vertical-align: middle\" src=\"http://www.vb-italy.org/skin/buttons/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"".$item_node->link."\">".$item_node->title."</a>";
}
?>
</div>
Adding a semicolon: Code: <div class="smallfont">
<?php
$url = "http://www.vb-italy.org/external.php?forumids=73,74&type-rss";
$fp_url = fopen("$url",'r');
$xml_raw_data = fread($fp_url,20480); // Read up to 20k of xml data
fclose($fp_url);
$xml_root = simplexml_load_string($xml_raw_data);
// Now loop all "items" childs nodes
foreach ($xml_root->item as $item_node){
echo "<img class=\"inlineimg\" style=\"vertical-align: middle\" src=\"http://www.vb-italy.org/skin/buttons/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"".$item_node->link."\">".$item_node->title."</a>";
}
?>
</div>
You can see it here: vB-Italy.org - Newsletter. (Articoli & Guide vBulletin) |
|
| | #13 | |||||||||
Location: Israel Age: 29 ![]() |
Status: Offline have you enabled the "rss feeder" on the admincp ? Regards, Idan. * Support will only be given via forums ! * If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here | |||||||||
|
| | #15 | |||||||||
Location: Israel Age: 29 ![]() |
Status: Offline I had error in the php script i gave u, the correct script is: PHP Code: regards. Regards, Idan. * Support will only be given via forums ! * If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here | |||||||||
|
![]() |
| Thread Tools | |
| |
All times are GMT. The time now is 12:56 AM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.




















