Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 02:10 am EDT

Geeklog Forums

story_introtext_only and story_bodytext_only


Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
How to make that {story_introtext_only} and {story_bodytext_only} will working in article.thtml?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
They don't work in article.thtml, only in the story*.thtml template files. In fact, the "formatted_article" article variable in article.thtml is replaced with the formatted content of the story template.

In other words: Use those variables in storytext.thtml, featuredstorytext.thtml, or archivestorytext.thtml and they will show up in article.thtml as expected.

bye, Dirk
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
I know, but I need that it will working only in articles but not on index.php
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Depends on what you have in mind. Some CSS magic may help.

Would have to look up how I did it, but for a site I had the requirement that the introtext should be in bold on the article page and not bold on the index page. Things like that can be done.

bye, Dirk
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
I need to put Google Adsense advertisin code beetween {story_introtext_only} and {story_bodytext_only}. It looks like this:

Text Formatted Code
{story_introtext_only} <div style="width: 342px; height: 280px; float: left;" id="layer1"> <script type="text/javascript"><!--
google_ad_client = "pub-3009791374728080";
/* EBPO &#1082;&#1074;&#1072;&#1076;&#1088;&#1072;&#1090; */
google_ad_slot = "2193375140";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div> {story_bodytext_only}


but when I put this code into storytext.thtml it is displaying many times on index.php Frown
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
could it possible?
 Quote

ironmax

Anonymous
Quote by: Pushkar

I need to put Google Adsense advertisin code beetween {story_introtext_only} and {story_bodytext_only}. It looks like this:

Text Formatted Code
{story_introtext_only} <div style="width: 342px; height: 280px; float: left;" id="layer1"> <script type="text/javascript"><!--
google_ad_client = "pub-3009791374728080";
/* EBPO &#1082;&#1074;&#1072;&#1076;&#1088;&#1072;&#1090; */
google_ad_slot = "2193375140";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div> {story_bodytext_only}


but when I put this code into storytext.thtml it is displaying many times on index.php Frown



Are you looking for something like what I have done? Look at Spacequad.

Michael
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Are you looking for something like what I have done? Look at Spacequad.

Michael
[/p]

like this http://www.spacequad.com/article.php/20100526151600850

but I need that the code was affixed to all articles and does not appear on index.php
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
A couple of years ago, we experimented with Google Ads here on geeklog.net. Back then, we put them above the article, right after the COM_siteHeader call (which also renders the left blocks, so that the ads would appear above the article text). That required a (simple) modification of article.php, though.

Can't think of an easy way to put an ad between the intro and body text ...

bye, Dirk
 Quote

ironmax

Anonymous
Quote by: Pushkar

Are you looking for something like what I have done? Look at Spacequad.

Michael


like this http://www.spacequad.com/article.php/20100526151600850

but I need that the code was affixed to all articles and does not appear on index.php[/p][/QUOTE]

Have you looked at the /layout/professional/article/article.thtml file?

Text Formatted Code

        {formatted_article}
        <div class="floatleft" style="width:50%;">{whats_related}</div>
        <div class="floatleft" style="width:50%;">{story_options}</div>
        <div class="clearboth">{trackback}</div>

<!--/*  * Replace all instances of INSERT_RANDOM_NUMBER_HERE with
  * a generated random number (or timestamp).
  *
  * The backup image section of this tag has been generated for use on a
  * non-SSL page. If this tag is to be placed on an SSL page, change the
  *   'http://advert.spacequad.com/www/delivery/...'
  * to
  *   'https://advert.spacequad.com/www/delivery/...'
  *
  * This noscript section of this tag only shows image banners. There
  * is no width or height in these banners, so if you want these tags to
  * allocate space for the ad before it shows, you will need to add this
  * information to the <img> tag.
  *
  * If you do not want to deal with the intricities of the noscript
  * section, delete the tag (from <noscript>... to </noscript>). On
  * average, the noscript tag is called from less than 1% of internet
  * users.
  */-->

<script type='text/javascript'><!--//<![CDATA[ document.MAX_ct0 ='INSERT_CLICKURL_HERE'; var m3_u = (location.protocol=='https:'?'https://advert.spacequad.com/www/delivery/ajs.php':'http://advert.spacequad.com/www/delivery/ajs.php'); var m3_r = Math.floor(Math.random()*99999999999); if (!document.MAX_used) document.MAX_used = ','; document.write ("<\/scr"+"ipt>"); //]]>--></script><noscript><a href='http://advert.spacequad.com/www/delivery/ck.php?n=a111d7f3&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://advert.spacequad.com/www/delivery/avw.php?zoneid=6&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a111d7f3&amp;ct0=INSERT_CLICKURL_HERE' border='0' alt='' /></a></noscript>

        {commentbar}
 


Try something like that in the file and you will only get banners on full pages.

Michael
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Quote by: Dirk

A couple of years ago, we experimented with Google Ads here on geeklog.net. Back then, we put them above the article, right after the COM_siteHeader call (which also renders the left blocks, so that the ads would appear above the article text). That required a (simple) modification of article.php, though.


how to do this?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Text Formatted Code
        $display .= COM_siteHeader('menu', $pagetitle, $headercode);

        $display .= 'Code for ads goes here ...';

        if (isset($_GET['msg'])) {

That's the second call to COM_siteHeader in article.php (the first one is for an "access denied" message).

bye, Dirk
 Quote

All times are EDT. The time is now 02:10 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content