11
shivaji
Re: META Tag hacks for Xoops 2.5.1
  • 2003/12/30 17:57

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Draven,

wow, its a good news.

Regards,
Shivaji.

12
wtravel
Re: META Tag hacks for Xoops 2.5.1

I am definetely on the list of the "we all want it" group. With the examples given by the enthusiastic Draven and Sunsnapper it should be possible to make it work untill a more definit solution will be implemented by the XOOPS core team in one of the next releases.

So untill then if anyone has some more successes with this, examples or anything interesting regarding this subject, I hope you can post this to the following topic:

mod_rewrite RewriteRule Success

Best wishes,

Martijn

13
shivaji
Re: META Tag hacks for Xoops 2.5.1
  • 2003/12/31 6:19

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Mithy t2

yah! there is a mistake in file name (news.html). Thank you for pointing me out on that.

I can use my logic in my way. I can use "if else" condition or I can create differnt html pages for each modules. Actualy I protest against Draven's logic not more than that.

Now tell me one thing those [who] are not aware about XOOPS code structure or doesn't know how to write "if else" condition in smarty template for themselves, what they will do, any suggestion?

14
Mithrandir
Re: META Tag hacks for Xoops 2.5.1

Quote:

shivaji wrote:
Mithy t2

yah! there is a mistake in file name (news.html). Thank you for that.
You're welcome

Quote:
Now tell me one thing those [who] doesn't know how to write "if else" condition in smarty template for themslaves what's your suggestion?
Smarty Manual

15
darapera
Re: META Tag hacks for Xoops 2.5.1
  • 2004/3/5 1:07

  • darapera

  • Just popping in

  • Posts: 67

  • Since: 2003/7/22


I'm trying to implement Draven's suggestion but I can't get it to work. Turning on PHPDebug I keep getting the following error

Warning [Xoops]: Smarty errorunable to read template resource"<{news" in file class/smarty/Smarty.class.php line 1042

and on the very top of the page I get Quote:
_meta.html"}>

What am I doing wrong? Any help is deeply appreciated.

16
dolphino
Re: META Tag hacks for Xoops 2.5.1
  • 2004/3/20 14:31

  • dolphino

  • Just popping in

  • Posts: 7

  • Since: 2003/11/12


I have this problem too. My hack:

The name of the "meta file" is: [module_name].meta (system.meta, news.meta, newbb.meta)

In theme.html call this file as:

<{include file="themedir/$xoops_cmod.meta"}>

That's all

17
Mithrandir
Re: META Tag hacks for Xoops 2.5.1

Quote:

darapera wrote:
I'm trying to implement Draven's suggestion but I can't get it to work. Turning on PHPDebug I keep getting the following error

Warning [Xoops]: Smarty errorunable to read template resource"<{news" in file class/smarty/Smarty.class.php line 1042

and on the very top of the page I get Quote:
_meta.html"}>

What am I doing wrong? Any help is deeply appreciated.

What does the code look like?

18
darapera
Re: META Tag hacks for Xoops 2.5.1
  • 2004/3/20 19:53

  • darapera

  • Just popping in

  • Posts: 67

  • Since: 2003/7/22


Mithrandir, I copied the code from Draven's post but here is what I did.

Replaced
Quote:
<meta name="keywords" content="<{$xoops_meta_keywords}>" />
<meta name="description" content="<{$xoops_meta_description}>" />
in theme.html with
Quote:
<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', $dirname );
<{/php}>
<{include file="themedir/<{$xoops_cmod}>_meta.html"}>
where themedir is the theme directory name then created individual files e.g. news_meta.html with the metas I want.

Login

Who's Online

117 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 117


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits