View Full Version : how do I display an array of links?
drynax
07-04-2008, 05:29 PM
What code would I use if I just want to show an array of just 2 fields:
Name of Link
URL Link
What would the two vba links field names be? And if I wanted to use a simple array to show links, what would that be?
Brian said that all the field names changed from 2.0 to 3.0, so I wondered what those would be for 3.0...
drynax
07-04-2008, 06:40 PM
Would I do something like they have in the RSS Feed Reader?
http://www.vbadvanced.com/forum/showthread.php?t=29487
In the above thread, Brian stated for the RSS Feed:
Just include the includes/vba_links_functions_savelink.php file and you can use the fetch_meta(). You just need to make sure that an array called $link is set that would look something like the example below and then run that function before the data is inserted into the db.
$link = array(
'name' => 'Link title',
'description' => 'Description of link',
'linkurl' => 'http://website.com'
);
Oh, you'll also need to query the options and set the $vba_options variable, which this should take care of:
PHP Code:
$dstore = $vbulletin->db->query_first("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title = 'adv_links_opts'
");
$vba_options = unserialize($dstore['data']);
Now this is for parsing and storing it from an RSS Feed with an array. I'm just looking for something to print it on the screen.
Brian
07-05-2008, 02:18 PM
Well, the first step would be to write a query to pull the links...
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.