Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
772 views
in Q2A Core by
edited by

İn qa-theme-base

i added this code

$pagetitle=strlen($this->request) ? strip_tags(@$this->content['title']) : '';
if (($pagetitle == "1.category name"))
  $this->output('<strong>1.ads link or code</strong>');
if (($pagetitle == "2category name"))
  $this->output('<strong>2.ads link or code</strong>');
if (($pagetitle == "3category name"))
  $this->output('<strong>3.ads link or code</strong>');

But erorr. How can i do it?

on the other hand;

( $pagetitle=strlen($this->request) ? strip_tags(@$this->content['title']) : ''; ) in place of : URLs to make focused?

Q2A version: lates
by
Didn't realize before, but this looks like a duplicate of the question you "answered" recently: http://question2answer.org/qa/7769/category-based-ads

2 Answers

0 votes
by

I'm not sure if what you're trying is the proper way to do it, but your last if() statement is missing a closing parentheses.

Yours:

if (($pagetitle == "3category name") 
  $this->output('<strong>3.ads link or code</strong>');

What it should be:

if (($pagetitle == "3category name")) 
  $this->output('<strong>3.ads link or code</strong>');

by
Unfortunately, it did not work
0 votes
by

function head_title()
        {
    $pagetitle=strlen($this->request) ? strip_tags(@$this->content['title']) : '';
$headtitle=(strlen($pagetitle) ? ($pagetitle.' - ') : '').$this->content['site_title'];
 
if (($headtitle == "Game"))
 {
  $this->output('<TITLE>Game Server, Ads</TITLE>');
 }
else
 {
  $this->output('<TITLE>'.$headtitle.'</TITLE>');
 }
        }

It worked for Category page title BUT I could not figure category ads...We're missing a little something.

...