Skip to content
WJunction - Webmaster Forum

What I'm doing wrong?

Status
Not open for further replies.

Divvy

Experienced Member
806
2009
18
Hello guys,

I have an website listing movies and series.
But I having problems showing the content in my "last added" block.

Look:
http://screensnapr.com/e/Zm4ssA.jpg

Only movies is showing, but not series...
Is the php file code If you wish to take a look:
http://paste2.org/p/1824759

categorie ID is correct: 7

the movies block sometimes have this issue too... the code is almost the same as above, maybe is the same problem...

Can someone help me? :)
Thank you!
 

2 comments

You only have one routine to select 3 films.

There is no routine to select series that I can see. You didn't explain well to whoever you got to write this program or they just sorgot the second half.
 
hi mate, thank you for your reply!

Let me explain better:

My website have 5 categories in the index.
I want to show last 3 posts in each category...
For each category that I want to show their posts, I have a file called newhome_x.php

In my templates/dirvideo/main.tpl file, I have this code:
Code:
<div id="page_content" class="clearfix">
{info} {newhome_final} {content}
</div>

In my templates/dirvideo/newhome.tpl file, I have this code:
Code:
<li style="margin-right: 45px;" onclick="window.location='{link}'">
<a title='{home_title}' href="{link}"><img src="[xfvalue_poster]" alt='{home_title}' /></a>
<h3 style="overflow:hidden"><a title='{home_title}' href="{link}">{home_title}</a></h3>
</li>

in my index.php I have this code:
Code:
require_once ENGINE_DIR . '/modules/newhome.php';
require_once ENGINE_DIR . '/modules/newhome_b.php';
require_once ENGINE_DIR . '/modules/newhome_c.php';
require_once ENGINE_DIR . '/modules/newhome_d.php';
require_once ENGINE_DIR . '/modules/newhome_e.php';

if (clean_url ( $_SERVER['HTTP_HOST'] ) != clean_url ( $config['http_home_url'] )) {

	$replace_url = array ();
	$replace_url[0] = clean_url ( $config['http_home_url'] );
	$replace_url[1] = clean_url ( $_SERVER['HTTP_HOST'] );

} else
	$replace_url = false;

if (!$is_logged && !in_array($_GET['do'], array('register', 'lostpassword'))) { include 'index.html'; die; }
$tpl->load_template ( 'main.tpl' );
$tpl->set ( '{lastusers}', $lastusers);
$tpl->set('{forumStyle}', require_once ROOT_DIR . '/engine/bullet_energy/modules/load_style.php');
require_once ENGINE_DIR . '/modules/3news.php';$source = '<div class="index_top1" style="width: 100%; padding-top: 10px; padding-bottom: 10px; " >						
<span style="font-size: 24px; margin-left: 10px;"><img border="0" src="templates/dirvideo/images/movies.gif">
</span>
<ul class="clearfix">
{newhome}
</ul>
</div>
<div class="index_top2" style="width: 100%; padding-top: 10px; padding-bottom: 10px; " >
<span style="font-size: 24px; margin-left: 10px;"><img border="0" src="templates/dirvideo/images/serie.gif">
</span>
<ul class="clearfix">
{newhome_b}
</ul>
</div>
<div class="index_top3" style="width: 100%; padding-top: 10px; padding-bottom: 10px; " >
<span style="font-size: 24px; margin-left: 10px;"><img border="0" src="templates/dirvideo/images/music.gif">
</span>
<ul class="clearfix">
{newhome_c}
</ul>
</div>
<div class="index_top6" style="width: 100%; padding-top: 10px; padding-bottom: 10px; " >
<span style="font-size: 24px; margin-left: 10px;"><img border="0" src="templates/dirvideo/images/jogo.gif">
</span>
<ul class="clearfix">
{newhome_e}
</ul>
</div>
<div class="index_top4" style="width: 100%; padding-top: 10px; padding-bottom: 10px; " >
<span style="font-size: 24px; margin-left: 10px;"><img border="0" src="templates/dirvideo/images/programas.gif">
</span>
<ul class="clearfix">
{newhome_d}
</ul>
</div>';
if (!isset($_REQUEST["catalog"]) && !isset($_REQUEST["newsid"]) && !isset($_REQUEST["do"]) && !isset($_REQUEST["page"]) && !isset($_REQUEST["category"]) && !isset($_REQUEST["cat"]) && !isset($_REQUEST["action"]) && !isset($_REQUEST["id"]) && !isset($_REQUEST["name"]) && !isset($_REQUEST["news_name"]) && !isset($_REQUEST["seourl"]) && !isset($_REQUEST["findpost"]) && !isset($_REQUEST["subaction"])) {	$tpl->set ( '{newhome_final}', $source);} else {	$tpl->set ( '{newhome_final}', "");}

$tpl->set ( '{referer}', $referer_block );
$tpl->set ( '{calendar}', $tpl->result['calendar'] );
$tpl->set ( '{top_news}', $top_news );
$tpl->set ( '{last_news}', $last_news );
$tpl->set ( '{rand_news}', $rand_news );
$tpl->set ( '{archives}', $tpl->result['archive'] );
$tpl->set ( '{tags}', $tpl->result['tags_cloud'] );
$tpl->set ( '{vote}', $tpl->result['vote'] );
$tpl->set ( '{topnews}', $topnews );
$tpl->set ( '{login}', $tpl->result['login_panel'] );
$tpl->set ( '{info}',  $tpl->result['info'] );
$tpl->set ( '{speedbar}', $tpl->result['speedbar'] );
$tpl->set ( '{catlist}', $catlist );
$tpl->set ( '{moviepopular}', $tpl->result['moviepopular'] );$tpl->set ( '{newhome}', $tpl->result['newhome'] );$tpl->set ( '{newhome_b}', $tpl->result['newhome_b'] );$tpl->set ( '{newhome_c}', $tpl->result['newhome_c'] );$tpl->set ( '{newhome_d}', $tpl->result['newhome_d'] );$tpl->set ( '{newhome_e}', $tpl->result['newhome_e'] );

In my engine/modules folder I have the files:
newhome.php
newhome_b.php
newhome_c.php
newhome_d.php
newhome_e.php

This is the code of engine/modules/newhome_c.php file:
http://paste2.org/p/1824759

I think that is everything here :-)
Can you help me?

P.S. Sometimes when I add new posts, appears in the block, and when I post other, disappear all from that category block...
 
Status
Not open for further replies.

About the author

D
Experienced Member · Joined
806
Messages
18
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom