Jump to content
TNG Community
John Paul

Adding additional features in template 18

Recommended Posts

John Paul

T18 has only 2 features in admin -> template settings.  I would like to add several more features directly under Feature 2 ( on the front page).  I know I'll need to mod some code in t18's index.php.  I need some help with at least getting started with this.  Thanks.

Could I maybe copy a section of code ( a div perhaps) and paste it where it belongs and edit it that way?   From what it looks like, I can do 2 features, one on the left and one on the right?  I'll attach a picture of it.....

The left half is only just that half.  I could fit another feature to the right.

Well I've been looking at that screen.  don't look like 2 columns, so how would i stretch feature 2 the whole width? and start another right underneath feature 2?

in t18 index.php there's this piece of code.... what does this mean?   after looking at the templatestyle.css, maybe there are 2 columns.....

<?php 
			echo getTemplateMessage('t18_featurepara2'); 
			$tl2 = getTemplateMessage('t18_featurelink2');
			if($tl2) {
		?>

screenshot.jpg

Edited by John Paul
Update

Share this post


Link to post
Share on other sites
RickM
3 hours ago, John Paul said:

in t18 index.php there's this piece of code.... what does this mean?

John Paul,

That appears to be the code to grab the info you put it the template setup page for the feature two.. There are two columns for this feature. The idea was to have part of the story there, which was long enough to cover the two columns as in the example setup.

It would be possible to put as many features as you wanted into that 'section' ('section' being the light blue background) regardless of how many it would take a reasonable amount of coding to do it. And in the words already mentioned about 'editing template index files' one should create their own template.. Out of my league to do this..

Share this post


Link to post
Share on other sites
John Paul

Thanks for that info Rick.  I was hoping not to have to change templates because I got it all matching,  i.e.; the tng t18, a new guestbook script to almost match and the smf forum, almost the same color scheme.  I'll see if a few more experts reply.  I'll also be examining the other templates more closely if I need to change....again.

I figured it would probably be a butt-load of coding involved.

Update:  The only other theme i could use is t20,  other than that, I'd have to go off the ranch and get one of those 60$ themes....

Edited by John Paul
added text

Share this post


Link to post
Share on other sites
John Paul

Well, i got it figured out so i can add more than 2 features in t18.  just had to mod the t18 index.php file a little.  of course it doesn't show up in admin -> setup -> template settings for t18.

But, it's still showing below feature 2.  I still can't figure out how to utilize the 2 columns.  Any help on that would be greatly appreciated.

Sorry for being such a nuisance to you guys during the holiday season.

Btw, this is NOT on my live site...yet.  here's the code I added to index.php: 

the first part is the original code for feature2.  It's the 'Joseph Story' I added to it.

<!-- Brother Walt Story -->

<div class="tblock" id="big-block-3">
	<h2><a href="<?php echo $tmp['t18_featurelink2']; ?>" title=""><?php echo getTemplateMessage('t18_featuretitle2'); ?></a></h2>
	<div class="left-indent mainsection">
		<br/>
		<div class="two-cols"><img src="<?php echo $cms['tngpath'] . $templatepath . $tmp['t18_featurethumb2']; ?>" alt="Lorem Ipsum" title="">
		<?php 
			echo getTemplateMessage('t18_featurepara2'); 
			$tl2 = getTemplateMessage('t18_featurelink2');
			if($tl2) {
		?>
			<p><a class="footer-link" href="<?php echo $tl2; ?>"><?php echo $text['more']; ?> ...</a></p>
		<?php
			}
		?>
	</div>
	</div>
	<div style="clear:left"></div>
</div>
<!-- End Brother Walt Story -->

<!-- Start Joseph Story -->

<div class="tblock" id="big-block-3">
	<h2><a href="extrapages/JosephNorkus.php" title="">Descendants of Juozapas Norkus</a></h2>
	<div class="left-indent mainsection">
		<br/>
		<div class="two-cols">
			<img src="templates/template18/img/joseph_thumb" alt="Joseph Norkus" title="">
			<p>Through the help of Cousin Russell Blaski who researched years ago, these are the facts that I have obtained for your knowledge:</p>
			<p><a class="footer-link" href="extrapages/JosephNorkus.php">More...</a></p>
		</div>
	</div>
	<div style="clear:left"></div>
</div>
<!-- End Joseph Story -->

 

Edited by John Paul
added code to post

Share this post


Link to post
Share on other sites
John Paul

ok I see what they're doing with the 2 columns.  Rick, you were right about that.  So We can put a solved on this. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×