51
jayjay
better xoopstree getnicepathfromid
  • 2007/8/30 9:51

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi all!

I have added these lines in class/xoopstree.php
$path $this->getNicePathFromId($parentid$title$funcURL$path);
[
color=FF0000]$path trim($path);
$path substr($path0strlen($path) - 13);[/color]


This trims the final separator when you make a breadcrumb path.

Before:
Start : Module : Page :

Now:
Start : Module : Page

Could this be added to the following release of xoops? Idea mostly stolen from wfdownloads, so credit to smartfactory



52
jayjay
Re: WF-Channel V2.00RC Released (Bug and Security Fixed)
  • 2007/8/30 9:33

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


@all

Stumbled upon this module update and upgraded from wfchannel 1.07. My pages were imported correctly in MySQL but they didn't display in the admin section and in the module userview. I also found bug after bug. This is more an alpha than a beta or even a RC. I switched to smartsection which is loads better.



53
jayjay
module breadcrumbs with cookies and url name
  • 2007/8/29 7:47

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Howdie all!

I was looking for a way to display breadcrumbs in the old phpwiki XOOPS module. I had already done a pagetitle hack and I thought it would be interesting to reuse this information in a breadcrumb.

I was looking for a quick solution using php and cookies and I quickly stumbled on this solution for history breadcrumbs.

This is what I did in phpwiki:

Make a breadcrumbs.php file in the module root with this content

<?php
/*
Copyright Justin Whitford 2006.
  http://www.whitford.id.au/
Perpetual, non-exclusive license to use this code is granted
on the condition that this notice is left in tact.
*/
$trailLength=5;
$staleCrumbList explode('|',$_COOKIE['breadcrumbs']);
if ( 
      
$_SERVER['REQUEST_URI'].'!'.$pageName !=
      
$staleCrumbList[count($staleCrumbList)-1]
   ){
  
$crumbList;
  
$startPoint=(count($staleCrumbList) < $trailLength+1)?0:1;
  for(
$i=$startPoint;$i<count($staleCrumbList);$i++){
    
$crumbList[$i]=$staleCrumbList[$i];
  }
  
$crumbList[count($crumbList)+1]=$_SERVER['REQUEST_URI'].'!'.$pageName;
  
setcookie('breadcrumbs',join('|',$crumbList),0,'/');
  
$_COOKIE['breadcrumbs']=join('|',$crumbList);
}

function 
breadcrumbs(){
  
$crumbList explode('|',$_COOKIE['breadcrumbs']);
  
$returnString '';
  for(
$i=1;$i<count($crumbList)-1;$i++){
    
$crumb=explode('!'$crumbList[$i]);
    
$returnString .= "<span id='bc$i' class='crumb'>"
      
."<a href='$crumb[0]'>$crumb[1]</a> &rarr; </span>";
  }
  
$crumb=explode('!'$crumbList[count($crumbList)-1]);
  echo 
$returnString.$crumb[1];
}

?>


Add this code in html.tmpl before printf
if($_SERVER['REQUEST_URI'] == '/modules/phpwiki/' || $_SERVER['REQUEST_URI'] == '/modules/phpwiki/index.php'){
$pageName 'Bestuur';}
else {
$pageName preg_replace('(/modules/phpwiki/index.php?pagename=(.*))''$1'$_SERVER['REQUEST_URI']);
$pageName ucfirst(ereg_replace('%20'' '$pageName));}
include (
$_SERVER['DOCUMENT_ROOT']  . '/modules/phpwiki/breadcrumbs.php');


Add this code in top.tmpl under <?= $HEADER ?>
<?php breadcrumbs(); ?>


You can see the result on the Stad Sint-Niklaas website.

I'm posting this here because this solution may be useful to module developers that use intuitive SEO url's.



54
jayjay
Re: x_movie module installation help
  • 2007/8/22 12:34

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


@all

Great module! I see a lot of dead links in this thread, so here is what you should do to get the latest version:

1: download original module x_movie 1.7 at rc-net.jp or xoopscube.jp.

2: download the custom version on voicha.com.

3: overwrite the original module with the custom version and upload the result to the XOOPS modules folder

4: edit the system module
overwrite system/blocks/system_blocks.php (backup old version first!)

add this in system/language/english/blocks.php:
define("_MB_X_MOVIE_NEW","New Movie File");
define("_MB_X_MOVIE_DAMAGE","Damaged Movie File");
define("_MB_X_MOVIE_REVISION","Movie File Revision");

You can do this for your own language too. Hope the translation is okay

5: some things aren't translated automagically, so you need to edit these files:

templates/x_movie_navi.html
<TABLE border='0' width='100%'>
<
TR><TD class="x_movie_navi" width='100%'>
<
a href="<{$xoops_url}>/modules/x_movie/index.php">Index</a>&nbsp;&#8226;&nbsp;
<a href="<{$xoops_url}>/modules/x_movie/list.php">List</a>&nbsp;&#8226;&nbsp;
<a href="<{$xoops_url}>/modules/x_movie/topten.php?hit=1">Top Ten Hits</a>&nbsp;&#8226;&nbsp;
<a href="<{$xoops_url}>/modules/x_movie/topten.php?rate=1">Top Ten Rating</a>&nbsp;&#8226;&nbsp;
<a href="<{$xoops_url}>/modules/x_movie/submit.php">Submit</a>
</
TD></TR></TABLE>


language/english/main.php add at the bottom
define("_MD_UPLOAD""Upload");        //    add by NAO8
define("_MD_X_MOVIE_RATINGSCALE","Rating scale");
define("_MD_X_MOVIE_URLCORRESPONDENCE","<small><b>URL</b> <a href="http://www.youtube.com/" target="_blank">YouTube</a>, <a href="http://www.break.com/" target="_blank">Break</a>, <a href="http://stage6.divx.com/" target="_blank">DivX Stage6</a>, <a href="http://www.watchme.tv/" target="_blank">Watchme.TV</a>, <a href="http://video.ask.jp/index.do" target="_blank">Ask.jp</a>, <a href="http://www.metacafe.com/" target="_blank">metacafe</a>, <a href="http://www.dailymotion.com/" target="_blank">Dailymotion</a></small>");
define("_MD_X_MOVIE_EMBEDCORRESPONDENCE","<small><b>EMBED</b> <a href="http://www.youtube.com/" target="_blank">YouTube</a>, <a href="http://www.break.com/" target="_blank">Break</a>, <a href="http://stage6.divx.com/" target="_blank">DivX Stage6</a>, <a href="http://www.watchme.tv/" target="_blank">Watchme.TV</a>, <a href="http://video.ask.jp/index.do" target="_blank">Ask.jp</a>, <a href="http://www.metacafe.com/" target="_blank">metacafe</a>, <a href="http://www.dailymotion.com/" target="_blank">Dailymotion</a></small>");
define("_MD_X_MOVIE_WEIGHT","Weight: ");



6: update system module and install x_movie module

That's all folks!



55
jayjay
Re: Hack: dokuwiki with xoops_pagetitle
  • 2007/8/7 5:11

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


I optimized the script for the upcoming dokuwiki for XOOPS 2.1 release:

if ($conf['userewrite'] == '0') {
  
$REQUEST_URI $_SERVER['REQUEST_URI'];
  if(
preg_match('/?id=/i'$REQUEST_URI)) {
  
$title preg_replace('((.*?)?id=(.*))''$2'$_SERVER['REQUEST_URI']);
  
$title ucfirst(ereg_replace('_'' '$title));
  
$title ereg_replace(':'' - '$title);
  
$xoopsTpl->assign('xoops_pagetitle'$title.' | '.$xoopsModule->name());
  } else {
   
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->name());
  }
 }
 elseif (
$conf['userewrite'] == '2') {
  
$REQUEST_URI $_SERVER['REQUEST_URI'];
  if(
preg_match('//doku.php//i'$REQUEST_URI)) {
  
$title preg_replace('((.*?)/doku.php/(.*))''$2'$_SERVER['REQUEST_URI']);
  
$title ucfirst(ereg_replace('_'' '$title));
  
$title ereg_replace(':'' - '$title);
  
$xoopsTpl->assign('xoops_pagetitle'$title.' | '.$xoopsModule->name());
  } else {
   
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->name());
  }
 }
 else {
  
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->name());
 }



56
jayjay
Re: Latest Dokuwiki release integrated in Xoops
  • 2007/8/3 12:05

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Thanks!

I'll send him an e-mail this weekend



57
jayjay
Latest Dokuwiki release integrated in Xoops
  • 2007/8/3 9:33

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi everybody!

I have integrated the latest stable Dokuwiki release (2007-06-26b) in XOOPS and everything seems to work fine. Right now I am solving some small issues.

I have based the integration on the great work of the Xoopsforge team. I hope a team member picks this post up, so that the module update can be posted on their site as a new release

PS: Please PM me if you would like to host this module.

Cheers

jayjay



58
jayjay
Re: searching through pdf files
  • 2007/6/19 12:42

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Quote:

Dave_L wrote:
Swish-e can search pdf's. I have it integrated into a XOOPS module for searching, but the module is not in a form that's easily publishable.


@dave_l

I am interested in your swish-e XOOPS integration. Could you post the module somewhere or send it to me by e-mail?



59
jayjay
Re: .htaccess Rewriterule after migrating from non-xoops site
  • 2007/6/7 7:17

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Quote:

highlander wrote:
*FIXED*

I am not quite sure why but I could only do this simple rewrite with the following code :

RewriteCond %{QUERY_STRING} ^topic=([0-9]+)&forum=([0-9]+)$
RewriteRule viewtopic.php /modules/newbb/viewtopic.php?topic_id=%1&forum=%[L]


I hope someone else will one day be helped by this.

Greetings Highlander

p.s. the escape charatar is an \


This is a great solution! I couldn't find a solution too, but this saved my day

I have migrated from phpbb to cbb and I used this code to rewrite url's:
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)$  
RewriteRule viewtopic.php /modules/newbb/viewtopic.php?topic_id=%1%[R,L]



60
jayjay
Re: Hack: xoops_pagetitle for wfdownloads 3.1
  • 2007/5/25 13:18

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


I tried subscribing on their website but I never got a subscription confirmation mail. Maybe their webserver won't send any mails or they are on a spam blacklist. Anyway, I hope they read it here




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



Login

Who's Online

218 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 218


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