Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

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
Reply
Page 2 of 2 < 1 2

 

  • Thread Tools
Old 07-05-2009, 08:04 PM   #11
Idan
Coder
Idan's Avatar

Activity Longevity
6/20 17/20
Today Posts
0/3 sssss1482
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default
In general, from a basic check i did the xml structure should be as follows:
Code:
<item>
   <title> </title>
   <link> </link>
</item>
In that case, i would make code similar to this:
PHP Code:
$url = "http://www.site.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.site.org/skin/buttons/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"".$item_node->link."\">".$item_node->title."</a>"; 
} 
Notes:
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.
Reply With Quote
Old 07-09-2009, 01:59 AM   #12
Norman
Coder

Norman's Avatar

Activity Longevity
0/20 13/20
Today Posts
0/3 ssssss242
Location: [Italy]
Norman is on a distinguished road
Send a message via MSN to Norman
Status: Offline Default
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>
I get a blank page.
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>
I get the page working but the cointainer is blank. There is no link showed.
You can see it here: vB-Italy.org - Newsletter.
(Articoli & Guide vBulletin)
Reply With Quote
Old 07-09-2009, 04:00 PM   #13
Idan
Coder
Idan's Avatar

Activity Longevity
6/20 17/20
Today Posts
0/3 sssss1482
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default
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
Reply With Quote
Old 07-09-2009, 07:20 PM   #14
Norman
Coder

Norman's Avatar

Activity Longevity
0/20 13/20
Today Posts
0/3 ssssss242
Location: [Italy]
Norman is on a distinguished road
Send a message via MSN to Norman
Status: Offline Default
Yup, that's enabled.
Reply With Quote
Old 07-24-2009, 08:22 PM   #15
Idan
Coder
Idan's Avatar

Activity Longevity
6/20 17/20
Today Posts
0/3 sssss1482
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default
I had error in the php script i gave u, the correct script is:

PHP Code:
$url = "http://www.site.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->channel->item as $item_node){ 
    echo 
"<img class=\"inlineimg\" style=\"vertical-align: middle\" src=\"http://www.site.org/skin/buttons/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"".$item_node->link."\">".$item_node->title."</a><br />"; 
} 
Awaiting your update on matter.

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
Reply With Quote

Reply
Page 2 of 2 < 1 2

« Help edit this layout please | Rss Feeds from another forum? »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules



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.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!