61
jayjay
Hack: phpwiki with xoops_pagetitle
  • 2007/5/24 7:44

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


The same is possible for the older phpwiki module.

Add this to index.php just above "include("../../footer.php")":

if($_SERVER['REQUEST_URI'] == '/modules/phpwiki/index.php'){
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->name()); }
else {
$title preg_replace('(/modules/phpwiki/index.php?pagename=(.*))''$1'$_SERVER['REQUEST_URI']);
$title ucfirst(ereg_replace('%20'' '$title));
$xoopsTpl->assign('xoops_pagetitle'$title.' | '.$xoopsModule->name()); }


This time I used preg_replace because ereg_replace wouldn't stick.



62
jayjay
Hack: xoops_pagetitle for wfdownloads 3.1
  • 2007/5/24 6:52

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Howdie!

Just a quick update on this for the latest version of WF-Downloads:

Add this in viewcat.php just before "include 'footer.php';"

$xoopsTpl->assign('xoops_pagetitle'$categories[$cid]->getVar('title').' | '.$xoopsModule->name());


Add this in singlefile.php just before "include 'footer.php';"

$xoopsTpl->assign('xoops_pagetitle'$download->getVar('title').' | '.$xoopsModule->name());


I wonder why this wasn't included by smartfactory?



63
jayjay
Hack: dokuwiki with xoops_pagetitle
  • 2007/5/23 12:49

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Howdie!

I was looking for a way to implement XOOPS pagetitles in the Dokuwiki module, but I couldn't find anything on this site or on Xoopsforge. Then I figured: why not implement it myself

Put this in doku.php:

if($_SERVER['REQUEST_URI'] == '/modules/dokuwiki/doku.php?'){
  
$xoopsTpl->assign('xoops_pagetitle''Start | '.$xoopsModule->name()); }
  else {
  
$title ereg_replace('/modules/dokuwiki/doku.php/(.*)''1'$_SERVER['REQUEST_URI']);
  
$title ucfirst(ereg_replace('_'' '$title));
  
$xoopsTpl->assign('xoops_pagetitle'$title.' | '.$xoopsModule->name()); }


just before this line at the end of the file:
include_once XOOPS_ROOT_PATH."/footer.php";


I basically used $_SERVER['REQUEST_URI'] to extract part of the URL and then used regular expressions to strip the first part off.

I use the internal url rewrite option in dokuwiki ('$conf['userewrite'] = 2;' in /conf/dokuwiki.php), but I guess someone can figure out a way to make this work without mod_rewrite (I'm too lazy )

Cheers,

Jay Jay



64
jayjay
Re: DocuWiki 2.0RC. Users cannot see images?
  • 2006/12/13 10:38

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Peekay!

That's a great solution! I've been struggling with the same problem, but you just made my day

If a dokuwiki XOOPS module developer reads this: please add this solution, because the final 2.0 release still has this problem!



65
jayjay
Re: Title Tag Hack
  • 2005/1/28 7:27

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Thanks for the compliment bjbtexas! I put a lot of work in it.

I only recently changed the title tag order myself in the theme on my website, after a hint at www.frxoops.org. If you know French a little, go visit it!



66
jayjay
Re: Title Tag Hack
  • 2005/1/27 9:09

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


You can put almost the exact same code in viewcat.php to show category titles in xdirectory:

$title="";
if(
$cid>0)
{
$sql "SELECT title FROM ".$xoopsDB->prefix("xdir_cat")." t where cid=$cid";
$result=$xoopsDB->query($sql,$show,$min);
$myrow $xoopsDB->fetchArray($result);
$title=$myts->makeTboxData4Show($myrow['title']);
}

$xoopsTpl->assign('xoops_pagetitle'$title.' | '.$myts->makeTboxData4Show($xoopsModule->getVar('name')));


I added this around line 90 just above this line:

if ($xoopsModuleConfig['useshots'] == 1) {


Have fun!



67
jayjay
Re: Title Tag Hack
  • 2005/1/26 10:11

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi bjbtexas!

Great work!

I'm interested in your title hack for xdirectory. Can you post it on xoops.org so that everyone can benefit from it?

I just posted a title tag hack for wfdownloads myself, but I feel lazy today so if you have a solution for xdirectory...



68
jayjay
title tag hack for wfdownloads
  • 2005/1/26 8:13

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi everybody!

I found a quick and dirty way to add a custom title tag for categories in wfdownloads.

Just add this at the bottom of viewcat.php:

$xoopsTpl->assign('xoops_pagetitle'$myts->makeTboxData4Show($description));

This'll add the "description" information of your categories in the title tag


I also use this code in singlefile.php. Credits to original poster:

$xoopsTpl->assign('xoops_pagetitle'$myts->makeTboxData4Show($down_arr['title']));


If anyone finds a better solution, please let me know!

Greets,

Jay Jay



69
jayjay
Re: Shorter url for xoops start page
  • 2004/11/24 7:42

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


@ Mithrandir
Thanks for the quick answer! I didn't think of that myself I'll try it out sometime...

In the meantime has anyone found a solution to this .htaccess problem? I'm trying to remove the "modules/news" part from my site url.



70
jayjay
Shorter url for xoops start page
  • 2004/11/23 14:24

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi everybody!

Before XOOPS 2.0.7, I used to be able to shorten my start page urls fromhttp://www.mysite.com/modules/news/ to simply
http://www.mysite.com/. I did that with this simple code in .htaccess:

RewriteRule ^$ /modules/news/index.php [L]
RewriteRule ^index.php$ /modules/news/index.php [L]
RewriteRule ^index.html$ /modules/news/index.php [L]


After upgrading to version 2.0.7 this code didn't work anymore. I understand that this is due to some security measures concerning the /modules/ folder.

Now I notice that two big XOOPS support sites have found a solution to this:

Xoops main site
https://xoops.org

Xoops France
http://www.frxoops.org/

Can anyone explain how these and other sites shorten their start page url's in XOOPS 2.0.7?

Thanks in advance!

Greets,

Jay Jay




TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 12 »



Login

Who's Online

208 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 208


more...

Donat-O-Meter

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

Latest GitHub Commits