Jump to content
TNG Community
Michael L Thomas

Featured Story 1

Recommended Posts

Michael L Thomas

This is a hyperlink but takes me nowhere, where can I find the destination so I may fix or edit it.  Same for all those on Template 4

Share this post


Link to post
Share on other sites
Rob Severijns

Hi Michael,

Not sure what you mean.

Can you explain what your problem is?

 

Rob

Share this post


Link to post
Share on other sites
Michael L Thomas

If you look at the generic template 4, you will see on the right side Feature Story, there are 4 of them, I can edit the photos, and the text, but the Feature Story, has a hyperlink that goes nowhere.  I am wanting to find and add the story.

Share this post


Link to post
Share on other sites
Newfloridian

Hi Michael

If you look at the code for template 4 in TNG12, you will see the commented out advisory for Features 1-4 in lines 176 to 180.

Depending how detailed you want to make your Feature Article, perhaps the best way is to use the file historytemplate.php Create a file under a new name (say myfirstarticle.php, store that file in the folder histories and then change lines 183 and 184 as follows:

                                <a href="histories/myfirstarticle.php"><img src="<?php echo $cms['tngpath'] . $templatepath; ?><?php echo $tmp['t4_featurethumb1']; ?>" alt="feature 1" class="featureimg" /></a>
                                <a href="histories/myfirstarticle.php"><span class="emphasis"><?php echo getTemplateMessage('t4_featuretitle1'); ?></span></a> <?php echo getTemplateMessage('t4_featurepara1'); ?><br clear="left"/>

I have been using template 4 for the best part of fifteen years now and have probably more than 500 Feature Articles across the website.

If you would like to see a recently completed example, let me know

Cheers Alan

 

 

 

 

Share this post


Link to post
Share on other sites
Michael L Thomas

Thank you so much, if you could show me the site you refer to, and the area of the code you talk about, I will give it a try.  Out of all the templates that come with TNG it is my favorite by far.  I have thought of incorporating TNG with Joomla, but there does not seem much interest or help available.  I am not a coder, but I like Joomla with Community Builder so I can get true family involvement within the different families.

Again Thanks

Michael

Share this post


Link to post
Share on other sites
Michael L Thomas

I am looking at the feature1.php

and there is NOT as many lines so I do not know what to do, and do not want to break it.  I will copy my file

 

close.jpg
application/x-httpd-php feature1.php 
PHP script text
<?php
include("tng_begin.php");

//  $logstring should contain the URL for your feature stories
//	writelog creates an entry in the Access Log
//	preparebookmark creates the bookmark link on the page

$logstring = "<a href=\"histories/feature1.php\">Your Feature 1 Story</a>";
writelog($logstring);
preparebookmark($logstring);

// The following $flags can be passed on the feature story pages.  The $flags can either be 
//	true or false 
$flags['noheader'] = false; // set to true to not include the template Custom Header
							// set to false to include the template Custom Header - normally topmenu.php
$flags['nobody'] = true;  	// set to not generate the <body> tag if the tag is in the topmenu.php
							// set to false to generate the <body> tag
$flags['noicons'] = false; 	// set to true to not generate the TNG menu bar 
							// set to false to generates the TNG menu bar
// for multi-language pages, you can use $text variables for your Feature Story Title
tng_header( "Your Feature 1 Story Title", $flags ); 
?>
<h1>Feature 1 Story</h1>
<p>
Your Feature 1 story goes here.  You can use HTML tags within the body of the story.  You can also use PHP code by inserting the code within a < ? php   ? > section (note that blanks were inserted in between the php starting and ending characters so the php start and end tags would display on the page.
</p>
<p>
If you are creating a story that you want to translate and display in the language the user has selected to view your site, then you can place the content that starts with the heading 1 (< h1 >) line to everything in the line before the tng_footer.php function call in your language folder and use a PHP 
</p>
include($mylanguage/feature1.php) to include the content from you language folder for each language you support on your site.    
<br />
For additional information see the TNG Wiki article on creating User Pages or histories using the historytemplate.php file at http://tng.lythgoes.net/wiki/index.php?title=User_Pages_-_Getting_Started and http://tng.lythgoes.net/wiki/index.php?title=User_Pages_-_Multi-Language
</p>
<p>
This feature1.php file was created from the historytemplate.php and saved in the histories folder as an example of how to create such a file.
</p>
<?php tng_footer( "" ); ?>

Share this post


Link to post
Share on other sites
Newfloridian

Hi Michael

I should have said that you need to look into template 4's index.php file. That's where you will find the lines I mentioned.

I've also send you a PM with an example of mine.

Cheers Alan

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

×