Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 07:49 am EDT

Geeklog Forums

Static page in article


Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Please help me, how to make the static page is displayed in the articles?

it's possible?

thank you
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can use the [staticpage_content:] autotag.

bye, Dirk
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Thanks, but can I use it in all articles? For example set in article.thtml?
or can I make the static page is displayed in the blocks?

Thank you
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Well, that's a different question now ...

It would probably help if you could tell us what you want to accomplish.

bye, Dirk
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
I need to use php-code in each article in a block or in a content.
This code can be automated through which to sell text link ads.

To be able to display hypertext links to those pages that you wish to connect to the system, it is necessary at the beginning of the source code of these pages, do the following php-box:
Text Formatted Code
<? php
      if (! defined ( '_SAPE_USER')) (
         define ( '_SAPE_USER', 'ea1c5ae7cd4d0f8bb2006efca54aabea');
      )
      require_once ($ _SERVER [ 'DOCUMENT_ROOT'].'/'._ SAPE_USER.' / sape.php ');
      $ sape = new SAPE_client ();
>


Further, in those places the page where you want to display links, you must insert the following code:
Text Formatted Code
<? echo $ sape-> return_links ($ n);?>


where $ n - number of links that you would like to take this place pages. The last call of this function in the document must take place without any parameters.


I know that this code can be displayed using the function and then put in phpblock. but how to do it, I do not know Frown
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can define your own template variables in a CUSTOM_templateSetVars function. Would that help?

You could have a {my_ad} variable that would be available in all the story templates.

See lib-custom.php for an example. It only mentions header.html there, but it's also being called for the 'storytext', 'featuredstorytext', and 'archivestorytext' templates (and a few others).

bye, Dirk
 Quote

All times are EDT. The time is now 07:49 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