Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 + 9 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: MyTutorials v2.1b html problem - please help :(
by DogTags on 2005/4/29 12:43:50

I was thinking of trying this mod. Have you gotten things sorted out? Is it working okay now?

I would love to put some tutorials on the site, but I'm no code-meister. I'd be afraid I'd mess up the whole show.

Thanks
Re: MyTutorials v2.1b html problem - please help :(
by mko_san on 2005/4/8 20:59:11

Well I figured it out...

to fix html problem, open up /tutorials/index.php

find
le="color: #000000"><?php $myts->makeTboxData4Show($myrow['cdesc']);


replace with
le="color: #000000"><?php $cdesc = $myrow['cdesc'];


if you need html in title, then find
le="color: #000000"><?php $myts->makeTboxData4Show($myrow['cname']);


replace with
le="color: #000000"><?php $cname = $myrow['cname'];


Another bug in this module is [ratethis] tag not parsing in tutorial view. To fix it open /tutorials/viewtutorial.php and find
le="color: #000000"><?php $content = str_replace("[date]","$date",$content);


add after
le="color: #000000"><?php $content = str_replace("[ratethis]","&nbsp;<a href="rate.php?tid=$tid"><b>"._MD_RATETHIS."</b></a>",$content);


There is ton of bugs in this module, it took me last 6 days to fix so it works for me. The blocks are totally screwed up, you will end up re-making them.

Here is my tutorials_top.php file. It should work for you, if you change respective file paths.

<?php /****************************************************************************** * Function: b_tutorials_top_show * Input : $options[0] = date for the most recent links * hits for the most popular tutorials * $block['content'] = The optional above content * $options[1] = How many reviews are displayes * Output : Returns the desired most recent or most popular tutorials ******************************************************************************/ function b_tutorials_top_show($options) { global $xoopsDB, $framebrowse; include_once XOOPS_ROOT_PATH."/modules/anime/cache/config.php"; include XOOPS_ROOT_PATH."/xoops.ccs"; $block = array(); $block['content'] = "<table width='100%' cellpadding="4" cellspacing=0><tr><td id="animenu" cellpadding="3"><small>"; $myts =& MyTextSanitizer::getInstance(); $result = $xoopsDB->query("select tid, tname, tlink, codes, status, hits, date from ".$xoopsDB->prefix("tutorials")." WHERE status=1 or status=3 ORDER BY ".$options[0]." DESC",$options[1],0); while (list($tid, $tname, $tlink, $codes, $status, $hits, $date) = $xoopsDB->fetchRow($result) ) { $tname = $myts->makeTboxData4Show($tname); if ( !XOOPS_USE_MULTIBYTES ){ if (strlen($tname) >= 21) { $tname = substr($tname,0,20)." ..."; } } if ($tlink != "") { if ($framebrowse == 1 || $codes >= 10) { $link_url = "".XOOPS_URL."/modules/anime/viewexttutorial.php?tid=$tid"; $link_target = ""; } else { $link_url = $tlink; $link_target = " target="_blank""; } $block['content'] .= "<a class="menuAni" href="'.$link_url.'" ".$link_target."><strong><big>·</big></strong>".$tname."</a>"; } else { $block['content'] .= "<a href="".XOOPS_URL."/modules/anime/viewtutorial.php?tid=$tid"><strong><big>·</big></strong>&nbsp;$tname</a>"; } $count = 7; //7 days $startdate = (time()-(86400 * $count)); if ($startdate < $time) { if($status==1){ $block['content'] .= "&nbsp;<img src="".XOOPS_URL."/modules/anime/images/newred.gif" />"; } elseif ($status==3){ $block['content'] .= "&nbsp;<img src="".XOOPS_URL."/modules/anime/images/update.gif" />"; } } if($options[0] == "date"){ $block['content'] .= "<div align="right" class="menuMain">&nbsp;<small>(".formatTimestamp($date,'s').")&nbsp;</small></div>"; $block['title'] = _MB_BLOCK_TITLE1; }elseif($options[0] == "hits"){ $block['content'] .= "<div align="right">&nbsp;<small>(".$hits.")&nbsp;</small></div>"; $block['title'] = _MB_BLOCK_TITLE2; } } $block['content'] .= "</small></td></tr></table>"; return $block; } function b_tutorials_top_edit($options) { $form = ""._MB_TUTORIALS_DISP."&nbsp;"; $form .= "<input type='hidden' name='options[]' value='"; if($options[0] == "date"){ $form .= "date'"; }else { $form .= "hits'"; } $form .= " />"; $form .= "<input type='text' name='options[]' value='".$options[1]."' />&nbsp;"._MB_TUTORIALS_TUTS.""; return $form; } ?>


I suggest you modyfy you short timestammp to something good looking, like "05 Apr 08", that way it will look nicer while used with above blocks ^_^

Good luck with this module, if you are going to use it, there is lots more bugs in it.. I found it easier to fix it then to write my own xP
Re: MyTutorials v2.1b html problem - please help :(
by mko_san on 2005/4/6 0:47:41

Quote:

Peekay wrote:
I was going to suggest posting your question directly on the developer's site, but I took a look at it and I get the impression that they only speak german!


lol. well if you look at dev's profile it says he logged in last time sometime last year. I sent him an email with a plea for help, got no anwser do far.

Quote:

I can't help with the PHP at all I'm afraid, but if you don't manage to get it sorted out, having looked at the Tutorials demo, I would have thought the Articles , arMS, AMS or WF-Sections modules could provide the same functionality

You might also want to investigate ecoTut 1.2. I am sure I have seen another teaching module somewhere, but this is all that a search for tutorial on Xoops.org shows up.


I tried AMS, it won't do at all. I'll try other ones, ecoTut sounds nice xD

Thx for help, Peekay ^_^
Too bad you can't help me with that PHP problem..

anybyde has any isead on how to force XOOPS to parse html parsing at database output string [using echo to display output]???
Re: MyTutorials v2.1b html problem - please help :(
by Peekay on 2005/4/6 0:12:18

I was going to suggest posting your question directly on the developer's site, but I took a look at it and I get the impression that they only speak german!

I can't help with the PHP at all I'm afraid, but if you don't manage to get it sorted out, having looked at the Tutorials demo, I would have thought the Articles , arMS, AMS or WF-Sections modules could provide the same functionality

You might also want to investigate ecoTut 1.2. I am sure I have seen another teaching module somewhere, but this is all that a search for tutorial on Xoops.org shows up.
Re: MyTutorials v2.1b html problem - please help :(
by mko_san on 2005/4/5 23:04:46

- bump -

help me guys T_T please T_T

any ideas how to force html parsing at database output string? Maybe something like pre-pasing it to make sure it has tagsin tact [not sth like & lt;html& gt;] before it reaches html parser?

please, please, please help me with it T_T

Who's Online

220 user(s) are online (181 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

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

Latest GitHub Commits