11
kaotik
Re: RMCommon Utilities 2 and MyWords 2 (Alpha)
  • 2010/5/17 13:52

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


kerkyra: I'm also searching for a solution... I'll let you know if I come up with anything.



12
kaotik
Re: RMCommon Utilities 2 and MyWords 2 (Alpha)
  • 2010/5/17 13:50

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


noo-b: I can also confirm this bug.



13
kaotik
Re: RMCommon Utilities 2 and MyWords 2 (Alpha)
  • 2010/5/17 13:48

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


I've just started testing the new rmcommon version.

Module management is definitly easy to use



14
kaotik
Re: Tutorial: Add rmcommon comments to your modules
  • 2010/5/10 13:00

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


pablo103: solution for catads 1.53:

open catads/templates/catads_item.html
find around line 199:
<{/if}>
div>


replace with:
<{/if}>
div>

<
a name="comments">a>
<{include 
file="db:rmc_comments_display.html"}>
<{include 
file="db:rmc_comments_form.html"}>


open catads/adsitem.php
around line 363 find:
showAds();
include 
XOOPS_ROOT_PATH.'/include/comment_view.php';


replace with:
showAds();
        include 
XOOPS_ROOT_PATH.'/include/comment_view.php';
        
//get all comments for this article/item
        
RMFunctions::get_comments('catads','catad='.$_GET['ads_id']);
        
// Comments form
        
RMFunctions::comments_form('catads''catad='.$_GET['ads_id'], 'module''');


Now comments work for catads



15
kaotik
Re: Tutorial: Add rmcommon comments to your modules
  • 2010/5/10 9:23

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


ok, i'll install catads.



16
kaotik
Re: RMCommon Utilities 2 and MyWords 2 (Alpha)
  • 2010/5/6 15:15

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Hi mjoel
I can't replicate your error which means I probably fixed it with one of my bugfixes.
http://code.google.com/p/bitcero-modules/issues/list

Try applying these 2:
http://code.google.com/p/bitcero-modules/issues/detail?id=4

http://code.google.com/p/bitcero-modules/issues/detail?id=7




17
kaotik
Tutorial Jquery: Chaining
  • 2010/5/6 14:51

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


To show what chaining is I'm going to use some of my own code.
This is a function I use in ajax. When an action is completed and everthing went OK, a message shows up during X time then disappears.
$("#tstme").click(function(){
            
notice('this is ok');
        });
 function 
notice($msg){
        $(
".notice").html($msg);
        $(
".notice").show();
        $(
".notice").delay(3500);
        $(
".notice").slideUp(300);
    }

As you can see, when someone clicks on the link "tstme", function 'notice' is then executed. Here's the logic:
$(".notice").html($msg); set the text inside the div called 'notice'
$(".notice").show(); Show the div since what was initially hidden
$(".notice").delay(3500); Display this message for X amount of time
$(".notice").slideUp(300); Slideup the div

Each time I made a call to $(".notice"), jquery had to process and associate this call to each event. For a small script and few page views you won't notice. But what if your site grows?
This is where chaining comes into play. This same code could be written like this:
$("#tstme").click(function(){
            
notice('this is ok');
        });
function 
notice($msg){
       $(
".notice").html($msg).show().delay(3500).slideUp(300);
    }

Now jquery will associate several event handlers to one event. It obeys the order in which they are placed. This speeds up your code.



18
kaotik
Re: Tutorial: Alternative Syntax
  • 2010/5/6 13:45

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


This method does exist in PHP and each person is free to code his/her module as they see fit.
I like to teach people and show them the available options. It's then up to them to analyse the pro's and con's of each alternative.

I can see your reasoning for the core. I'm sure standard methods won't be affected by my small tutorial.
Programing is an ever changing profession and learning new methods is an important part of it.



19
kaotik
Tutorial: Alternative Syntax
  • 2010/5/6 11:43

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Alternative syntax

We are all used to writing code like this:
if ($a==1){
echo 
'hello world';
}


Now what if you have a lot of dependent code:
if ($a==1){
switch (
$i) {
    case 
0:
        echo 
"i equals 0";
        break;
    case 
1:
        echo 
"i equals 1";
        break;
}
}


Understanding the end brackets can become dificult. Php provides a solution called alternative syntax.

This same code could be written:
if ($a==1):
switch (
$i) :
    case 
0:
        echo 
"i equals 0";
        break;
    case 
1:
        echo 
"i equals 1";
        break;
endswitch;
endif;


I'm not stating it's better or worse then the common way



20
kaotik
Re: RMCommon Utilities 2 and MyWords 2 (Alpha)
  • 2010/5/6 10:21

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


sarahmx:
your layout problem is solved here:
http://code.google.com/p/bitcero-modules/issues/detail?id=13




TopTop
« 1 (2) 3 4 5 ... 59 »



Login

Who's Online

168 user(s) are online (139 user(s) are browsing Support Forums)


Members: 0


Guests: 168


more...

Donat-O-Meter

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

Latest GitHub Commits