myMasjid Development

Text_Wiki : getRenderConf()

void getRenderConf (string format name, string rule name [, string conf key])

Gets the value of a configuration key for a rule rendered in a specific format; if no key is specified, gets the entire configuration array.

$wiki =& new Text_Wiki();

// get the list of pages that the wikilink rule knows about
$dir = $wiki->getRenderConf(’Xhtml’, ‘Wikilink’, ‘pages’);

// get all configs for the “Xhtml” format “wikilink” rule
$conf = $wiki->getRenderConf(’Xhtml’, ‘Wikilink’);
?>

Text_Wiki:MethodGetRenderConf (pmjones)
Thu, 12 Aug 2004, 21:35

  • Share/Bookmark

Text_Wiki : setRenderConf()

setRenderConf

Set one key at a time
void setFormatConf (string format name, string rule name, string conf key, mixed conf value)
Set all keys at once
void setFormatConf (string format name, string rule name, array conf key-value pairs)

Set the configuration for a rule renderer. For example, to tell the “Table” rule in “Xhtml” format what CSS class to use for data cells…

$wiki =& new Text_Wiki();
$wiki->setRenderConf(’Xhtml’, ‘Table’, ‘css_td’, ‘my_td_class’);
?>

To set all of the “Table” configuration keys for “Xhtml” at the same time…

$wiki =& new Text_Wiki();

$conf = array(
‘css_table’ => ‘my_table_class’,
‘css_tr’ => ‘my_tr_class’,
‘css_td’ => ‘my_td_class’
);

$wiki->setRenderConf(’Xhtml’, ‘Table’, $conf);
?>

  • Share/Bookmark

Text_Wiki : getSource()

getSource

string getSource ()

Gets the value of the $source property; i.e., the source text after all rules have been applied and matching rules have replaced source text with delimited tokens. This is generally useful only after parse() has been called.

// [snip] create a Text_Wiki object called $wiki
// [snip] load some source text into $text
$wiki->parse($text);
$source_with_delimited_tokens = $wiki->getSource();
?>

  • Share/Bookmark

Text_Wiki : setParseConf()

setParseConf

Set one key at a time
void setParseConf (string rule name, string conf key, mixed conf value)
Set all keys at once
void setParseConf (string rule name, array conf key-value pairs)

Set the configuration for a rule parser. For example, to tell the “include” rule what base path to use for scripts:

$wiki =& new Text_Wiki();
$wiki->setParseConf(’include’, ‘base’, ‘/path/to/scripts’);

?>

Note: Most rules use “render” configurations, not parse configurations.

  • Share/Bookmark

Text_Wiki : disableRule() and enableRule()

// [snip] instantiate a Text_Wiki object ($wiki).

// now disable the HTML, embed, and include rules.
$wiki->disableRule(’html’);
$wiki->disableRule(’embed’);
$wiki->disableRule(’include’);

// turn the ‘html’ rule back on
$wiki->enableRule(’html’);
?>

  • Share/Bookmark

Mungkin Wikipedia Melayu Sudah Memadai

I was planning to put up a Malay-Islamic wiki at myMasjid. Since I found something like such at ms.wikipedia.org .. I think no need to re-invent the wheel laa …

- Imam Ghazali : http://ms.wikipedia.org/wiki/Abu_Hamid_Al-Ghazali
- Al-Marbawi : http://ms.wikipedia.org/wiki/Syeikh_Idris_al-Marbawi

  • Share/Bookmark

Wildcard domain headache

Memandangkan telah diwildcardkan server myMasjid, maka semua subdomain yang sebelum ni wujud .. pakat tak boleh jalan … Including this blog, since last Thursday.

Alhamdulillah its back. Keampunan dan rahmat Allah dah sampai.

## process aalwi subdomain …
## kalau ada call .. semua hantaq pi tempat lain
RewriteCond %{HTTP_HOST} ^aalwi.mymasjid.net.my$
RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ /xxxxxx/xxxxxxx/xxxxxxx/xxxxxx/aalwi/$1 [l]

## kalau dak .. hantaq pi script lain untuk process …
RewriteCond %{HTTP_HOST} !^www\.mymasjid\.net\.my
RewriteCond %{HTTP_HOST} ([^.]+)\.mymasjid\.net\.my
RewriteRule ^(.*)$ /xxxxxx/xxxxxxx/xxxxxxx/xxxxxx/mymasjid/t2.php?t=%1 [l]

  • Share/Bookmark

Wiki Based Masjid Profile

After filling a few particular, an editor can create a textual profile describing his masjid. The textual description will accept Wiki syntax, as I have added a few related PEAR packeges that translate Wiki markup safely into HTML.

http://pear.php.net/package/Text_Wiki/redirected

  • Share/Bookmark

Putting aside the old records

I am putting aside all the old masjid records (2001), those who wish to participate in myMasjid as an editor will have to re-create their masjid.

However, the old record can be retrieve during the creation of new record. This is to ensure the functionality of the sub-domain is 100% no redundant.

  • Share/Bookmark

Subdomain for each masjid …

After this we are going to have something like :

http://al-huda.mymasjid.com.my

instead of something like this ..

http://www.mymasjid.net.my/masjid.php?id=18

The trick is simple ..

1- create a wildcard subdomain from Cpanel

2-create a mod_rewrite that redirect the subdomain to a script ..

Reference : http://www.modrewrite.com/

  • Share/Bookmark