PDA

View Full Version : headlines...


apocan
05-02-2007, 03:51 PM
instead of using forward and back to change the headlines articles can we make numbers under the summary of headlines as 1-2-3-4 ? and when we click on the numbers other headlines articles will be shown...

is this possible?

chaichai21
05-02-2007, 04:48 PM
Hey i like this very much.

Infact this is really excellent. I have seen a few news sites have this, i think netscape has this too.

utvara
05-02-2007, 05:41 PM
There is a simple customization that can produce this...

PHP:
(this applies to 3.5 clean install)
includes/box/HTML_article_list.php

find $pattern (around line 45) and replace it with

$pattern=array(
'{ROOT}',
'{ID}',
'{CREATED}',
'{AUTHOR}',
'{CAPTION_TITLE}',
'{LINK}',
'{IMAGE}',
'{BODY}',
'{CATEGORY_NAME}',
'{IMAGE_WIDTH}',
'{IMAGE_HEIGHT}',
'{BOX_WIDTH}',
'{REDIRECT_LINK}',
'{REDIRECT_CAPTION}',
'{COUNTER}'
);


find $replacement (around line 82) and replace it with

$replacement=array(
WP_URL,
$article->Id,
vivvo_date($article->Created, true),
$article->get_author_info(),
$article->Title,
$article->get_href(),
$article->Image,
$article->get_summary($article_params['word_number']),
$article->get_category_name(),
$vp_size['width'],
$vp_size['height'],
$box_width,
$redirect_link,
$redirect_caption,
$count + 1
);


now you can use {COUNTER} in your template files like this

<li>{COUNTER} <a href="{ROOT}{LINK}">{CAPTION_TITLE}</a></li>

(article_title.tpl for boxes)

apocan
05-02-2007, 09:54 PM
I dont know if I did something wrong but it didnt work in my site. I like as in that pic...

http://img79.imageshack.us/img79/8837/ddddiv6.jpg

instead of this that happened...

http://img50.imageshack.us/img50/696/sgfdfgra8.jpg

apocan
05-04-2007, 09:26 PM
any help ?

chaichai21
05-08-2007, 02:53 PM
apocan,
i have not tried this yet, but this is exactly what i was thinking about also, good work on the image.

apocan
05-08-2007, 07:48 PM
I hope it could be made sooner or later :)

utvara
05-09-2007, 10:07 AM
I misunderstood you the first time :(

To accomplish what you want to do, you'll need to know JS and CSS (or find some unobtrusive JS that does the trick). On PHP side what you need to do is change HTML_featured_news.php in include/box.

if ($ajax){
$output = HTML_article_list(
false,
'',
array(),
'headlines.xml.tpl',
array('image_width' => $headlines_image_width, 'image_height' => $headlines_image_height, 'word_number' => $headlines_word_number),
array('a.status' => 1, 'a.created' => $cur_date, 'a.featured_news' => 1, 'a.id' => $id),
'order_desc',
'descending',
1
);


change the number at the bottom (1) to how much articles you want to be in tabs.

More on tweaking article lists on this tread http://www.vivvo.net/forums/showthread.php?t=674

For JS tabs I suggest you check out http://livepipe.net/projects/control_tabs/ (it is a prototype based tabbing).

Good luck with your customization.

utvara

apocan
05-09-2007, 10:50 AM
thanks for your help but it seems, at least for now, it wont be possible for me to customize :)