IrishGuinea
02-07-2007, 05:09 PM
Hey all
I'm stuck with a problem, after several attempts and redos my novice php skills have failed me and I need help.
After creating the Custom box from your instructions on the sticky thread all was well until I tried to produce a second box. Everytime and anywhere I place a second box, if theres more than one in the cell the highest one will wrap around everything below it. See pic here (http://www.rbr.com/MW/ads.jpg)
The Classifieds box on the right was the successful attempt, then when I added the second box, Advertisements, as you can see it gets put inside the classifieds box. If I move the Advertisers box above then the Classifieds box will show up inside the Advertisers box.
Why is this happening/what am I doing wrong?:confused:
Thanks for any help on this.
shketuljko
02-08-2007, 08:59 AM
Please, paste your code of CUSTOM BOXES from your site or give us link of your site, well we try to find mistake in your code.
IrishGuinea
02-08-2007, 06:45 PM
Sorry, should have done that to begin with...
Last two entries in template_scripts/framework.php
<?php
/*
* Created on Apr 10, 2006
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$HTML_output .= file_get_contents($filename);
$template_manager->assign($login_HTML,'/{LOGIN_INFO}/');
$template_manager->assign(($frontend_show_menu == 0) ? '' : $box_sections_HTML,'/{BOX_SECTIONS}/');
$template_manager->assign(($frontend_show_menu == 1) ? '' : $dhtml_menu ,'/{DHTML_MENU}/');
$template_manager->assign($box_search_HTML,'/{BOX_SEARCH}/');
$template_manager->assign($box_syndication_HTML,'/{BOX_SYNDICATION}/');
$template_manager->assign($box_newsletter_HTML,'/{BOX_NEWSLETTER}/');
$template_manager->assign($main_subject_HTML,'/{MAIN_SUBJECT}/');
$template_manager->assign($Show_category_headers_HTML,'/{BOX_CATEGORY_HEADERS}/');
$template_manager->assign($box_mostPopular_HTML,'/{BOX_MOST_POPULAR}/');
$template_manager->assign($box_mostCommented_HTML,'/{BOX_MOST_COMMENTED}/');
$template_manager->assign($box_featuredAuthor_HTML,'/{BOX_FEATURED_AUTHOR}/');
$template_manager->assign($box_pool_HTML,'/{BOX_POLL}/');
$template_manager->assign($calendar,'/{CALENDAR}/');
$template_manager->assign(($show_news_ticker != 0) ? $ticker : '','/{TICKER}/');
$template_manager->assign((($showFriendlyURL == 'friendly') ? 'all' : 'index.php?view_all'),'/{VIEW_ALL}/');
$template_manager->assign(($show_most_commented_box == 'No') ? '' : $box_mostCommented_HTML,'/{BOX_MOST_COMMENTED}/');
$template_manager->assign(($show_most_popular_box == 'No') ? '' : $box_mostPopular_HTML,'/{BOX_MOST_POPULAR}/');
$template_manager->assign(($show_most_emailed_box == 'No') ? '' : $most_emailed,'/{BOX_MOST_EMAILED}/');
$template_manager->assign(($show_featured_news_box == 'No') ? '' : $featured_news_HTML,'/{FEATURED_NEWS}/');
$template_manager->assign(($show_more_headlines_box == 'No') ? '' : $more_headlines,'/{MORE_HEADLINES}/');
$template_manager->assign(($show_featured_author_box == 'No') ? '' : $box_featuredAuthor_HTML,'/{BOX_FEATURED_AUTHOR}/');
$template_manager->assign($classified_box,'/{CLASSIFIED_BOX}/');
$template_manager->assign($buttonads_box,'/{BUTTONADS_BOX}/');
?>
Last two entries in template_scripts/default.php
<?php
// ovo saraniti sto pre, napraviti skripte za svaki posebo template
$HTML_output .= file_get_contents($filename);
$template_manager->assign($login_HTML,'/{LOGIN_INFO}/');
$template_manager->assign($int_title,'/{TITLE}/');
$template_manager->assign($meta_names,'/{META_NAMES}/');
$template_manager->assign($css,'/{CSS}/');
$template_manager->assign(strftime("%B %d, %Y"),'/{STRFTIME}/');
$template_manager->assign(($frontend_show_menu == 0) ? '' : $box_sections_HTML,'/{BOX_SECTIONS}/');
$template_manager->assign(($frontend_show_menu == 1) ? '' : $dhtml_menu ,'/{DHTML_MENU}/');
$template_manager->assign($box_search_HTML,'/{BOX_SEARCH}/');
$template_manager->assign($box_syndication_HTML,'/{BOX_SYNDICATION}/');
$template_manager->assign($box_newsletter_HTML,'/{BOX_NEWSLETTER}/');
$template_manager->assign($main_subject_HTML,'/{MAIN_SUBJECT}/');
$template_manager->assign($latest_news_HTML,'/{LATEST_NEWS}/');
$template_manager->assign($Show_category_headers_HTML,'/{BOX_CATEGORY_HEADERS}/');
$template_manager->assign($box_siteTools_HTML,'/{BOX_SITE_TOOLS}/');
$template_manager->assign($show_login_HTML,'/{SHOW_LOGIN_FORM}/');
$template_manager->assign($box_pool_HTML,'/{BOX_POLL}/');
$template_manager->assign($calendar,'/{CALENDAR}/');
$template_manager->assign(($show_news_ticker != 0) ? $ticker : '','/{TICKER}/');
$template_manager->assign((($showFriendlyURL == 'friendly') ? 'all' : 'index.php?view_all'),'/{VIEW_ALL}/');
// categories data
$template_manager->assign($Title,'/{CATEGORY_NAME}/');
$template_manager->assign($HTML_Category_Link_Rss,'/{CATEGORY_LINK_RSS}/');
$template_manager->assign($HTML_Category_Link_Archive,'/{CATEGORY_LINK_ARCHIVE}/');
$template_manager->assign($HTML_Category_Link_Sort,'/{SORT_BY}/');
$template_manager->assign($category_articles_short_HTML,'/{ARTICLE_SHORT}/');
$template_manager->assign($show_pager_HTML,'/{PAGINATION}/');
// articles data
$template_manager->assign($article_tools_HTML,'/{ARTICLE_TOOLS}/');
$template_manager->assign($article_tool_comment_HTML,'/{ARTICLE_TOOL_COMMENT}/');
$template_manager->assign($article_date_HTML,'/{ARTICLE_DATE}/');
$template_manager->assign($article_author_HTML,'/{ARTICLE_AUTHOR}/');
$template_manager->assign($Breadcrumb_HTML,'/{BREADCRUMBS}/');
$template_manager->assign($article->Title,'/{ARTICLE_TITLE}/');
$template_manager->assign($Caption_Title,'/{CAPTION_TITLE}/');
$template_manager->assign($article->Body.$link,'/{ARTICLE_BODY}/');
$template_manager->assign($article->Times_read,'/{ARTICLE_TIMES_READ}/');
$template_manager->assign($article_author_link_HTML,'/{ARTICLE_AUTHOR_LINK}/');
$template_manager->assign($article->Image,'/{ARTICLE_IMAGE}/');
$template_manager->assign($article_related_HTML,'/{ARTICLE_RELATED_NEWS}/');
$template_manager->assign($article_pool_HTML,'/{ARTICLE_VOTE}/');
$template_manager->assign($article_comments,'/{ARTICLE_COMMENTS}/');
$template_manager->assign($sitemap_link,'/{SITEMAP_LINK}/');
$template_manager->assign($url,'/{ROOT}/');
$template_manager->assign(($show_most_commented_box == 'No') ? '' : $box_mostCommented_HTML,'/{BOX_MOST_COMMENTED}/');
$template_manager->assign(($show_most_popular_box == 'No') ? '' : $box_mostPopular_HTML,'/{BOX_MOST_POPULAR}/');
$template_manager->assign(($show_most_emailed_box == 'No') ? '' : $most_emailed,'/{BOX_MOST_EMAILED}/');
$template_manager->assign(($show_featured_news_box == 'No') ? '' : $featured_news_HTML,'/{FEATURED_NEWS}/');
$template_manager->assign(($show_more_headlines_box == 'No') ? '' : $more_headlines,'/{MORE_HEADLINES}/');
$template_manager->assign(($show_featured_author_box == 'No') ? '' : $box_featuredAuthor_HTML,'/{BOX_FEATURED_AUTHOR}/');
$template_manager->assign($classified_box,'/{CLASSIFIED_BOX}/');
$template_manager->assign($buttonads_box,'/{BUTTONADS_BOX}/');
//$subject = $template_manager->get_output();
?>
Last two entries in HTML_function.php
//Classifeds box
function custom_classified_box(){
global $url, $tpl_folder;
$filename="$tpl_folder/box_classified.tpl";
$subject=file_get_contents($filename);
$pattern=array('{ROOT}');
$replacement=array($url,$text);
$classified_box = my_str_replace($pattern, $replacement, $subject);
return $classified_box;
}
//ButtonAds box
function custom_buttonads_box(){
global $url, $tpl_folder;
$filename="$tpl_folder/box_buttonads.tpl";
$subject=file_get_contents($filename);
$pattern=array('{ROOT}');
$replacement=array($url,$text);
$buttonads_box = my_str_replace($pattern, $replacement, $subject);
return $buttonads_box;
}
include/toolboxes.php
<?php
$cur_date=date("Y-m-d 23:59:59");
$box_sections_HTML=HTML_Category_Menu();
$box_search_HTML=HTML_Box_Search();
$box_syndication_HTML=HTML_Box_Syndication();
$box_newsletter_HTML=HTML_Box_Newsletter();
$box_siteTools_HTML=HTML_Box_Site_Tools();
$box_featuredAuthor_HTML=HTML_Featured_Author();
$Show_category_headers_HTML=HTML_show_category_hea ders();
$box_mostPopular_HTML=HTML_Box_Most_Popular($top_r eading_since);
$box_mostCommented_HTML=HTML_Box_Most_Commented();
$ticker = HTML_ticker();
$dhtml_menu = DHTML_menu();
$classified_box = custom_classified_box();
$buttonads_box = custom_buttonads_box();
$most_emailed = most_emailed();
$more_headlines = more_headlines();
if (isset($_POST['month'])){
$date = getdate(mktime(0,0,0, $_POST['month'], 1, $_POST['year']));
}
$calendar=HTML_calendar($date);
if (file_exists("plugins/polls/polls.php") and (!isset($_GET['poll'])))
{
include_once("plugins/polls/polls.php");
$box_pool_HTML=box_poll();
}
?>
box_classified.tpl
<!-- box_classified.tpl -->
<DIV class=boxHeadline_right>Classifieds</DIV>
<DIV class=right_box>
<DIV class=plainTxt>
<b>General Sales Manager</b><br />
Independent Aggressive Radio is Great Radio. Like that ring of Independent Aggressive Radio? Then add in a great city like Tampa and you never leave. GSM post is open for that aggressive radio pro that likes independent thinking. Like getting local direct business and working with and for your clients? Thinking out of the box the way radio must be to succeed. View our check list.
<br /><br />
<IMG alt=arrow
src="{ROOT}img/arrow_most.gif"
align=bottom> <a href="">View More Media Jobs</a>
<!-- end box -->
box_buttonads.tpl
<!-- box_ads_topright.tpl -->
<DIV class=boxHeadline_ads>Advertisments</DIV>
<DIV class=right_box>
<DIV class=plainTxt>
<img src="{ROOT}/files/banners/button3.gif" width="155" height="85"><br /><br />
<img src="{ROOT}/files/banners/button1.jpg" width="155" height="85"><br /><br />
<img src="{ROOT}/files/banners/button2.gif" width="155" height="85">
<!-- end box -->
shketuljko
02-09-2007, 08:31 AM
In your HTML code:
<!-- box_classified.tpl -->
<DIV class=boxHeadline_right>Classifieds</DIV>
<DIV class=right_box>
<DIV class=plainTxt>
<b>General Sales Manager</b><br />
Independent Aggressive Radio is Great Radio. Like that ring of Independent Aggressive Radio? Then add in a great city like Tampa and you never leave. GSM post is open for that aggressive radio pro that likes independent thinking. Like getting local direct business and working with and for your clients? Thinking out of the box the way radio must be to succeed. View our check list.
<br /><br />
<IMG alt=arrow
src="{ROOT}img/arrow_most.gif"
align=bottom> <a href="">View More Media Jobs</a>
<!-- end box -->
i can't see end of DIV tag.
If You don't know, this code is not VALID.
You need to close every tag.
example:
<!-- box_classified.tpl -->
<DIV class=boxHeadline_right>Classifieds</DIV>
<DIV class=right_box>
<DIV class=plainTxt>
<b>General Sales Manager</b><br />
Independent Aggressive Radio is Great Radio. Like that ring of Independent Aggressive Radio? Then add in a great city like Tampa and you never leave. GSM post is open for that aggressive radio pro that likes independent thinking. Like getting local direct business and working with and for your clients? Thinking out of the box the way radio must be to succeed. View our check list.
<br /><br />
<IMG alt=arrow src="{ROOT}img/arrow_most.gif" align=bottom /> <a href="">View More Media Jobs</a>
</DIV>
</DIV>
<!-- end box -->
IrishGuinea
02-09-2007, 07:35 PM
Simple fix for a dumb mistake.
Thank you for the help!
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.