PDA

View Full Version : Banner rotator as rotating headlines


StigeBK
05-06-2009, 01:23 PM
I have a banner rotator in flash as a .swf that uses an xml file to call the pictures that it uses.

How can this be intergrated into vivvo as the rotating headlines?

I would like to pay an amount off fee for the job to be done.

Can enyone help me do this? :confused:

Alaali
05-06-2009, 05:49 PM
Hi,

sorry can you explain? do you want your banners to be rotated using as same as rotating headling code? or do you want to place the flash file in your template?

StigeBK
05-07-2009, 04:40 PM
It is to replace the rotating headlines.
It's a sort off monoslide.

I have a banner rotator, where all of the images are called in from a .xml file. It must be possible to make that .xml file call in the abstract images of the headline articles in vivvo.

It is used in many other big sites.

example:
http://www.uefa.com/
http://www.fifa.com/

This must be possible in vivvo?

krcko
05-08-2009, 09:02 AM
it is possible to do that with Vivvo, of course.

to have that xml pulling headlines from Vivvo database, you'll need to make url handler for it. this is how you should do it:

- create new file {VIVVO ROOT}/lib/vivvo/url_handlers/headline_xml.php
- put this in it:

<?php

function headline_xml_url_handler(&$sm, $url_array){

$template =& $sm->get_template();

header("Content-type: text/xml; charset=UTF-8");
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$template->set_template_file(VIVVO_FS_TEMPLATE_ROOT . VIVVO_TEMPLATE_DIR . 'box/headline_xml.tpl');

echo $sm->get_output();
exit;
}

?>

- execute this query on your database (it's easiest to do with phpmyadmin):

INSERT INTO `PREFIXConfiguration` (`variable_name`, `variable_property`, `variable_value`, `module`, `domain_id`, `reg_exp`) VALUES
('headlines.xml', 'file', 'lib/vivvo/url_handlers/headline_xml.php', 'url_modules', 1, NULL),
('headlines.xml', 'url_handler_function', 'headline_xml_url_handler', 'url_modules', 1, NULL);

just replace PREFIX with your table prefix and if you want you can change headlines.xml to whatever you want (this will be the name of your xml file)

- the only thing left is to create template file (box/headline_xml.tpl) that will be used to generate your xml file. you can use box/rotating_headlines.tpl as a reference.

StigeBK
05-09-2009, 12:44 AM
it is possible to do that with Vivvo, of course.

to have that xml pulling headlines from Vivvo database, you'll need to make url handler for it. this is how you should do it:

- create new file {VIVVO ROOT}/lib/vivvo/url_handlers/headline_xml.php
- put this in it:

<?php

function headline_xml_url_handler(&$sm, $url_array){

$template =& $sm->get_template();

header("Content-type: text/xml; charset=UTF-8");
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$template->set_template_file(VIVVO_FS_TEMPLATE_ROOT . VIVVO_TEMPLATE_DIR . 'box/headline_xml.tpl');

echo $sm->get_output();
exit;
}

?>

- execute this query on your database (it's easiest to do with phpmyadmin):

INSERT INTO `PREFIXConfiguration` (`variable_name`, `variable_property`, `variable_value`, `module`, `domain_id`, `reg_exp`) VALUES
('headlines.xml', 'file', 'lib/vivvo/url_handlers/headline_xml.php', 'url_modules', 1, NULL),
('headlines.xml', 'url_handler_function', 'headline_xml_url_handler', 'url_modules', 1, NULL);

just replace PREFIX with your table prefix and if you want you can change headlines.xml to whatever you want (this will be the name of your xml file)

- the only thing left is to create template file (box/headline_xml.tpl) that will be used to generate your xml file. you can use box/rotating_headlines.tpl as a reference.

Thanks krcko.

I have followed your instructions, but i cant figure out to define the .xml file so it grabs the info from the articles.. This is way to hard for me..

I need much more guidence to make this work. :confused:

caracena
08-30-2009, 07:14 PM
Hi all,

Sorry to bring back an old thread, but I have a problem with this. I'm also placing a Flash Headlines Rotator instead of any of the default ones. I folowed the steps and I'm stuck at the .tpl creation.

I hard-coded some XML data so it shows something but {VIVVO ROOT}lib/vivvo/url_handlers/headline_xml.php shows nothing (blank page). This is what I have inside my headline_xml.tpl page:
<vte:box module="box_article_list">
<vte:params>
<vte:param name="search_status" value="2" />
<vte:param name="search_sort_by" value="order_num" />
<vte:param name="search_order" value="descending" />
<vte:param name="cache" value="1" />
<vte:param name="add_to_printed" value="true" />
<vte:param name="exclude_printed" value="true" />
</vte:params>
<data>
<width>720</width>
<height>260</height>
<displayIndex>0</displayIndex>
<autoSwitch>true</autoSwitch>
<pauseAutoSwitchOnMouseOver>true</pauseAutoSwitchOnMouseOver>
<delayTime>5</delayTime>
<menuItemBorderSize>1</menuItemBorderSize>
<menuItemBorderColor>0xFFFFFF</menuItemBorderColor>
<menuItemBorderAlpha>30</menuItemBorderAlpha>
<menuItemSpace>2</menuItemSpace>
<menuItemWidth>150</menuItemWidth>
<menuItemHeight>50</menuItemHeight>
<menuPosition>right</menuPosition>
<menuScrollSpeed>0.05</menuScrollSpeed>
<bgColor>0x000000</bgColor>
<bgAlpha>100</bgAlpha>
<textPad>15</textPad>
<textSpace>10</textSpace>
</data>
</vte:box>What am I missing exactly?

Thanks!!!

Jolly^Guy
01-31-2010, 11:47 PM
Hi I think this way is easy and I've experience with it...
http://www.vivvo.net/forums/showpost.php?p=26529&postcount=2

krcko
why you did not advice him to use it ?

Jolly^Guy
01-31-2010, 11:54 PM
Hi all,

Sorry to bring back an old thread, but I have a problem with this. I'm also placing a Flash Headlines Rotator instead of any of the default ones. I folowed the steps and I'm stuck at the .tpl creation.

I hard-coded some XML data so it shows something but {VIVVO ROOT}lib/vivvo/url_handlers/headline_xml.php shows nothing (blank page). This is what I have inside my headline_xml.tpl page:
<vte:box module="box_article_list">
<vte:params>
<vte:param name="search_status" value="2" />
<vte:param name="search_sort_by" value="order_num" />
<vte:param name="search_order" value="descending" />
<vte:param name="cache" value="1" />
<vte:param name="add_to_printed" value="true" />
<vte:param name="exclude_printed" value="true" />
</vte:params>
<data>
<width>720</width>
<height>260</height>
<displayIndex>0</displayIndex>
<autoSwitch>true</autoSwitch>
<pauseAutoSwitchOnMouseOver>true</pauseAutoSwitchOnMouseOver>
<delayTime>5</delayTime>
<menuItemBorderSize>1</menuItemBorderSize>
<menuItemBorderColor>0xFFFFFF</menuItemBorderColor>
<menuItemBorderAlpha>30</menuItemBorderAlpha>
<menuItemSpace>2</menuItemSpace>
<menuItemWidth>150</menuItemWidth>
<menuItemHeight>50</menuItemHeight>
<menuPosition>right</menuPosition>
<menuScrollSpeed>0.05</menuScrollSpeed>
<bgColor>0x000000</bgColor>
<bgAlpha>100</bgAlpha>
<textPad>15</textPad>
<textSpace>10</textSpace>
</data>
</vte:box>What am I missing exactly?

Thanks!!!

try this it work fine (I test it)

<vte:box module="box_article_list">
<vte:params>
<vte:param name="search_status" value="2" />
<vte:param name="search_sort_by" value="order_num" />
<vte:param name="search_order" value="descending" />
<vte:param name="cache" value="1" />
<vte:param name="add_to_printed" value="true" />
<vte:param name="exclude_printed" value="true" />
</vte:params>
<vte:template>
<data>
<width>720</width>
<height>260</height>
<displayIndex>0</displayIndex>
<autoSwitch>true</autoSwitch>
<pauseAutoSwitchOnMouseOver>true</pauseAutoSwitchOnMouseOver>
<delayTime>5</delayTime>
<menuItemBorderSize>1</menuItemBorderSize>
<menuItemBorderColor>0xFFFFFF</menuItemBorderColor>
<menuItemBorderAlpha>30</menuItemBorderAlpha>
<menuItemSpace>2</menuItemSpace>
<menuItemWidth>150</menuItemWidth>
<menuItemHeight>50</menuItemHeight>
<menuPosition>right</menuPosition>
<menuScrollSpeed>0.05</menuScrollSpeed>
<bgColor>0x000000</bgColor>
<bgAlpha>100</bgAlpha>
<textPad>15</textPad>
<textSpace>10</textSpace>
</data>
</vte:template>
</vte:box>
you've forgot to add <vte:template> tag inside your tpl :cool: