Main site welcome text to disappear after read more clicked - Joomla! Forum - community, help and support
hi guys,
i have custom html welcome text inserted on main site , below placed news items. welcome text disappear when "read more" button clicked on news article. source given below, can please me modifying make welcome message go away?
<?php
/*******************************************************************************************/
/*
/* designed 'as designing'
/* web: http://www.asdesigning.com
/* email: info@asdesigning.com
/*
/*******************************************************************************************/
defined( '_jexec' ) or die( 'restricted access' );
/* following line loads mootools javascript library */
jhtml::_('behavior.framework', true);
/* following line gets application object things displaying site name */
$app = jfactory::getapplication();
?>
<?php
setcookie("firsttime", "true", time()+60*60*24*30);
if($_cookie["firsttime"] != "true"){
header("location: /welcome.html"); <- else, not subject of question
exit;
}
?>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/bloglayout.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/slider/css/slider.css" type="text/css" media="screen" />
<script type="text/javascript" src="templates/<?php echo $this->template ?>/scripts/general.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/scripts/jquery.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/slider/scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/slider/scripts/jquery.slider.pack.js"></script>
<?php
include 'ie6warning.php';
include 'params.general.php';
include 'styles.php';
if(!$leftcolumn)
{
echo '<link rel="stylesheet" href="' . $this->baseurl . '/templates/' . $this->template . '/css/bloglayout.single.css" type="text/css" />';
}
?>
</head>
<body>
<div id="sitewrapper">
<!-- header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div id="header">
<div class="row1">
<div class="content">
<div id="topnavbar">
<div class="custom">
<div id="contactlink">
<a href="/index.php/contact" title="contact us">
<img src="/images/spacer.png" border="0" width="1" height="1" style="border: 0;" /></a>
</div>
<div id="searchlink">
<a href="index.php?option=com_search&view=search&searchword=search" title="search">
<img src="/images/spacer.png" border="0" width="1" height="1" style="border: 0;" /></a>
</div>
<div id="homelink">
<a href=" title="home">
<img src="/images/spacer.png" border="0" width="1" height="1" style="border: 0;" /></a>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
<div class="menurow">
<div id="topmenu">
<jdoc:include type="modules" name="position-1"/>
</div>
</div>
<div class="row2">
<div class="content">
<div class="row2col1">
<div id="logo">
<a href="<?php echo $this->baseurl; ?>">
<img src="/images/logo.png" alt="logo"/>
</a>
</div>
</div>
<div class="row2col2">
<jdoc:include type="modules" name="position-2"/>
</div>
</div>
</div>
</div>
<!-- end of header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="clear"></div>
<div id="content">
<!-- column left ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<?php if($leftcolumn) : ?>
<div id="colleft">
<?php if($this->countmodules('position-32-40')): ?>
<div class="row1">
<jdoc:include type="modules" name="position-32-40" style="xhtml"/>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<!-- end of column left ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- column main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div id="colmain" <?php echo $maincolumn_width; ?> >
<?php if($this->countmodules('position-4')): ?>
<div>
<jdoc:include type="modules" name="position-4" style="xhtml"/>
</div>
<script type="text/javascript">
if(window.location.pathname != '/'){
document.getelementbyid('[b]welcomemessagefrontpage').style.display = 'none';
}
</script>[/b]
<?php endif; ?>
<jdoc:include type="message" />
<div id="component" <?php echo $maincolumn_cntwidth; ?> >
<jdoc:include type="component" />
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<!-- end of column main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</div>
<div class="clear"></div>
<div id="push"></div>
</div>
<!-- footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div id="footer">
<div class="row2">
<div class="content">
<?php if($this->countmodules('position-32-51')): ?>
<div class="row2col1">
<jdoc:include type="modules" name="position-32-51" style="xhtml"/>
</div>
<?php endif; ?>
<div class="row2col2">
<div id="trade">copyright © <?php echo date('y'); ?> <?php echo $app->getcfg('sitename'); ?></div>
<!-- not remove or change content below, template may not work -->
<!-- more info see our copyright notice free website templates: http://astemplates.com/terms.php -->
<div id="ascopy">
|
<a href="http://www.andrewjsaid.com/" target="_blank">
designed by: andrew j said
</a>
</div>
<!-- not remove or change content above, template may not work -->
<!-- more info see our copyright notice free website templates: http://astemplates.com/terms.php -->
</div>
</div>
</div>
<div class="item-separator"></div>
</div>
<!-- end of footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</body>
</html>
i have custom html welcome text inserted on main site , below placed news items. welcome text disappear when "read more" button clicked on news article. source given below, can please me modifying make welcome message go away?
<?php
/*******************************************************************************************/
/*
/* designed 'as designing'
/* web: http://www.asdesigning.com
/* email: info@asdesigning.com
/*
/*******************************************************************************************/
defined( '_jexec' ) or die( 'restricted access' );
/* following line loads mootools javascript library */
jhtml::_('behavior.framework', true);
/* following line gets application object things displaying site name */
$app = jfactory::getapplication();
?>
<?php
setcookie("firsttime", "true", time()+60*60*24*30);
if($_cookie["firsttime"] != "true"){
header("location: /welcome.html"); <- else, not subject of question
exit;
}
?>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/bloglayout.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/slider/css/slider.css" type="text/css" media="screen" />
<script type="text/javascript" src="templates/<?php echo $this->template ?>/scripts/general.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/scripts/jquery.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/slider/scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/slider/scripts/jquery.slider.pack.js"></script>
<?php
include 'ie6warning.php';
include 'params.general.php';
include 'styles.php';
if(!$leftcolumn)
{
echo '<link rel="stylesheet" href="' . $this->baseurl . '/templates/' . $this->template . '/css/bloglayout.single.css" type="text/css" />';
}
?>
</head>
<body>
<div id="sitewrapper">
<!-- header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div id="header">
<div class="row1">
<div class="content">
<div id="topnavbar">
<div class="custom">
<div id="contactlink">
<a href="/index.php/contact" title="contact us">
<img src="/images/spacer.png" border="0" width="1" height="1" style="border: 0;" /></a>
</div>
<div id="searchlink">
<a href="index.php?option=com_search&view=search&searchword=search" title="search">
<img src="/images/spacer.png" border="0" width="1" height="1" style="border: 0;" /></a>
</div>
<div id="homelink">
<a href=" title="home">
<img src="/images/spacer.png" border="0" width="1" height="1" style="border: 0;" /></a>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
<div class="menurow">
<div id="topmenu">
<jdoc:include type="modules" name="position-1"/>
</div>
</div>
<div class="row2">
<div class="content">
<div class="row2col1">
<div id="logo">
<a href="<?php echo $this->baseurl; ?>">
<img src="/images/logo.png" alt="logo"/>
</a>
</div>
</div>
<div class="row2col2">
<jdoc:include type="modules" name="position-2"/>
</div>
</div>
</div>
</div>
<!-- end of header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="clear"></div>
<div id="content">
<!-- column left ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<?php if($leftcolumn) : ?>
<div id="colleft">
<?php if($this->countmodules('position-32-40')): ?>
<div class="row1">
<jdoc:include type="modules" name="position-32-40" style="xhtml"/>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<!-- end of column left ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- column main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div id="colmain" <?php echo $maincolumn_width; ?> >
<?php if($this->countmodules('position-4')): ?>
<div>
<jdoc:include type="modules" name="position-4" style="xhtml"/>
</div>
<script type="text/javascript">
if(window.location.pathname != '/'){
document.getelementbyid('[b]welcomemessagefrontpage').style.display = 'none';
}
</script>[/b]
<?php endif; ?>
<jdoc:include type="message" />
<div id="component" <?php echo $maincolumn_cntwidth; ?> >
<jdoc:include type="component" />
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<!-- end of column main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</div>
<div class="clear"></div>
<div id="push"></div>
</div>
<!-- footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div id="footer">
<div class="row2">
<div class="content">
<?php if($this->countmodules('position-32-51')): ?>
<div class="row2col1">
<jdoc:include type="modules" name="position-32-51" style="xhtml"/>
</div>
<?php endif; ?>
<div class="row2col2">
<div id="trade">copyright © <?php echo date('y'); ?> <?php echo $app->getcfg('sitename'); ?></div>
<!-- not remove or change content below, template may not work -->
<!-- more info see our copyright notice free website templates: http://astemplates.com/terms.php -->
<div id="ascopy">
|
<a href="http://www.andrewjsaid.com/" target="_blank">
designed by: andrew j said
</a>
</div>
<!-- not remove or change content above, template may not work -->
<!-- more info see our copyright notice free website templates: http://astemplates.com/terms.php -->
</div>
</div>
</div>
<div class="item-separator"></div>
</div>
<!-- end of footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</body>
</html>
maybe can help:
find these lines
the code below verify if menu item "home" , shows welcome text. otherwise text welcome doesn't shown.
if others pages show welcome text, because category don't have menu item . solution create menu without module categories.
sorry bad english...
find these lines
code: select all
<?php
setcookie("firsttime", "true", time()+60*60*24*30);
if($_cookie["firsttime"] != "true"){
header("location: /welcome.html"); <- else, not subject of question
exit;
}
?>the code below verify if menu item "home" , shows welcome text. otherwise text welcome doesn't shown.
code: select all
<?php
$app = jfactory::getapplication();
$menu = $app->getmenu();
if ($menu->getactive() == $menu->getdefault()) {
setcookie("firsttime", "true", time()+60*60*24*30);
if($_cookie["firsttime"] != "true"){
header("location: /welcome.html"); <- else, not subject of question
exit;
}
}
if others pages show welcome text, because category don't have menu item . solution create menu without module categories.
sorry bad english...
Comments
Post a Comment