<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#8235;oc666 zone &#187; כללי&#8236;</title>	<atom:link href="http://oc666.net/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://oc666.net</link>
	<description>&#8235;האיזור הכי שטני באינטרנט&#8236;</description>	<lastBuildDate>Tue, 07 Sep 2010 11:38:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>he</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8235;How to make Joomla website multisite&#8236;</title>		<link>http://oc666.net/2009/12/09/how-to-make-joomla-website-multisite/</link>
		<comments>http://oc666.net/2009/12/09/how-to-make-joomla-website-multisite/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 00:11:16 +0000</pubDate>
		<dc:creator>&#8235;oc666&#8236;</dc:creator>				<category><![CDATA[כללי]]></category>
		<category><![CDATA[קוד פתוח]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[multisite]]></category>

		<guid isPermaLink="false">http://oc666.net/?p=314</guid>
		<description><![CDATA[&#8235;This post is transalation of the Hebrew guide in my blog. I'm doing it after requsests from the Joomla Conference 2009 at New York.
This guide use single installation of Joomla that produce multiple sites with one configuration file for each site with its own database prefixes. Although there are various extensions for that purpose, but [...]&#8236;]]></description>			<content:encoded><![CDATA[<div dir="rtl"><p style="text-align: left;" dir="ltr">This post is transalation of the <a title="How to make Joomla multisite - Hebrew guide" href="http://oc666.net/?p=47" target="_blank">Hebrew guide</a> in my blog. I'm doing it after requsests from the Joomla Conference 2009 at New York.</p>
<p style="text-align: left;" dir="ltr">This guide use single installation of Joomla that produce multiple sites with one configuration file for each site with its own database prefixes. Although there are various extensions for that purpose, but I recommend to do it by this hack, because it can control the way that different sites will be run better and adjust performance by dividing the load in case of multiple servers.<br />
Note that this installation distinguishes between a database of sites by the prefix of data in database tables. You can divide each site to different MySQL instances.</p>
<p style="text-align: left;" dir="ltr"><strong><span id="more-314"></span>Step One &#8211; how sites will be identified</strong></p>
<p style="text-align: left;" dir="ltr">At this point we decide how users will be sent between sites. This can be done by domain-prefix or url querystring. The first method identified the site by the initial of the domain. The second method identified the site by using the add-to-url string (querystring). This post will demonstrate the use the first method.</p>
<p style="text-align: left;" dir="ltr"><strong>Step Two &#8211; Define routing file </strong></p>
<p style="text-align: left;" dir="ltr">Routing file define how we will know which site surfer arrived. We'll placed file naming routing.php in the includes directory.</p>
<blockquote style="text-align: left;" dir="ltr">
<p style="text-align: left;" dir="ltr">defined( '_JEXEC' ) or die( 'Restricted access' );</p>
<p>$baseurl = 'domain.com'; /* your domain without any prefix like www */<br />
$default_prefix = 'www';<br />
$config_path = 'config'.DS;<br />
$sitename=str_replace('.'.$baseurl, &quot;, $_SERVER['SERVER_NAME']);</p>
<p>/*</p>
<p>// for querystring manipulation<br />
// if the structure is: http://www.domain.com/sites/sitename<br />
// ** without sub-domain **<br />
$ar = explode( &quot;/&quot;, $_SERVER['REQUEST_URI']);<br />
$sitename = $ar[2];</p>
<p>*/<br />
if(!file_exists(JPATH_ROOT.DS. $config_path.$sitename.&quot;.php&quot;))<br />
{<br />
if(strpos($_SERVER['SERVER_NAME'], $baseurl)&amp;&amp;($sitename!=$default_prefix))<br />
// if there is a domain request and not sub domain exist redirect to default site<br />
{<br />
header (&quot;Location: http://'.$default_prefix.&quot;.$baseurl);<br />
die('no such sub domain.&lt;br/&gt;redirecting to default site…');<br />
}<br />
$sitename = $default_prefix; // if u want to premit ip domain request (or computer name; localhost also)<br />
}<br />
define( 'JCONFIG_SITENAME', $sitename);<br />
define('JCONFIG_PATHNAME',$config_path.JCONFIG_SITENAME.'.php');</p></blockquote>
<p style="text-align: left;" dir="ltr">This file take the prefix of the domain and put it to into JCONFIG_SITENAME constant and path of configuration file under constant JCONFIG_PATHNAME (configuration file of Joomla as a default is configuration.php and is located in front of The Joomla). Configuration files will be located under the config directory under the main directory of Joomla. This library contains all the configuration files of the sites. If the configuration file of the sub-domain does not exist it will be sent to by default (www). Also, copy this file to includes directory of the administrator directory.</p>
<p style="text-align: left;"><strong>Step Three &#8211; The files update Joomla</strong></p>
<p style="text-align: left;" dir="ltr">At this time we will update the Joomla files to the settings we've made. First we'll update index.php files to execute the script we add.</p>
<p style="text-align: left;" dir="ltr">We add the following line after line 21 in index.php in the main directory of Joomla index.php file and in the administrator directory:</p>
<blockquote style="text-align: left;">
<p style="text-align: left;" dir="ltr">require_once (JPATH_BASE. DS. 'includes'. DS. &quot;Routing.php');</p>
</blockquote>
<p style="text-align: left;" dir="ltr">Then, we update the The Joomla core of the new path of configuration file of the specific site. We will do this using a simple sed command. Under Linux:</p>
<blockquote style="text-align: left;"><p>for i in `find <em>/your/joomla/full_path/</em> -type f; do echo sed-i&quot; s; 'Configuration.php; JCONFIG_PATHNAME; &quot;$ i done</p></blockquote>
<p style="text-align: left;" dir="ltr">Under Windows:</p>
<blockquote style="text-align: left;">
<p style="text-align: left;" dir="ltr">FOR / r &quot;<em>your\joomla\full\path</em>&quot;%% a in (*. php) do (<br />
sed-i &quot;s; 'Configuration.php; JCONFIG_PATHNAME;&quot; &quot;%% a&quot;)</p>
</blockquote>
<p style="text-align: left;" dir="ltr">You must replace your <em>\joomla\full\path</em> to the path of your Joomla installation on your server. Windows server sed command is not built, so we'll have to install it. You can download it <a title="sed command for windows" href="http://gnuwin32.sourceforge.net/packages/sed.htm" target="_blank">here</a>.</p>
<p style="text-align: left;" dir="ltr">Here actually finished the update code. Note that if your default domain is www you must create a configuration file of Joomla called www.php under config directory. Probably need to create this directory if not yet created. The configuration file of the original Joomla (configuration.php), which is the main directory of Joomla, could be used as the default domain of the central (www.php).</p>
<p style="text-align: left;"><strong>The final step &#8211; a database for all domain </strong></p>
<p style="text-align: left;" dir="ltr">In addition, each domain will have to create tables Joomla with his differentprefix to control. Prefix probably might be the domain name for the orderly structure of course. You must set the prefix tables in the site configuration file (again under the config directory).</p>
<p style="text-align: left;" dir="ltr">To duplicate a database you'll need to export data base by the prefix of the names of the tables there so you can use one of the following scripts (Linux or Windows).<br />
For Linux:</p>
<blockquote style="text-align: left;"><p>#!/bin/bash<br />
DB=&quot;$1"<br />
PREFIX=$2<br />
EXPORT_FILE=$3<br />
HOST=YOUR_DB_HOST<br />
USER=YOUR_DB_USER<br />
PASSWORD=YOUR_DB_PASSWORD</p>
<p>if [ -z ${EXPORT_FILE} ]; then<br />
EXPORT_FILE=&quot;export.sql&quot;<br />
fi</p>
<p>if [ -z ${DB} ]; then<br />
echo &quot;YOU NEED AT LEAST 2 ARGS:&quot;<br />
echo &quot;1ST ARG DB&quot;<br />
echo &quot;2ND ARG PREFIX&quot;<br />
echo &quot;3RD ARG EXPORT FILE NAME (DEFAULT: export.sql)&quot;<br />
else<br />
if [ -z ${PREFIX} ]; then<br />
echo &quot;YOU DIDNT FILLED DB&quot;<br />
else<br />
TEMP_FILE=&quot;/tmp/agron.mysql&quot;<br />
mysql -h ${HOST} -u ${USER} –password=${PASSWORD} -D ${DB} -e &quot;SHOW TABLES FROM ${DB} LIKE '${PREFIX}%'&quot; -N &gt; ${TEMP_FILE}</p>
<p>if [ -w ${EXPORT_FILE} ]; then<br />
rm ${EXPORT_FILE}<br />
fi</p>
<p>cat ${TEMP_FILE} | while read LINE ; do<br />
echo ${LINE}<br />
mysqldump -h ${HOST} -u ${USER} –password=${PASSWORD} ${DB} ${LINE} &gt;&gt; ${EXPORT_FILE}<br />
done</p>
<p>if [ -w ${TEMP_FILE} ]; then<br />
rm ${TEMP_FILE}<br />
fi<br />
echo &quot;Export done&quot;<br />
fi<br />
fi<br />
fi</p></blockquote>
<p style="text-align: left;" dir="ltr">For windows:</p>
<blockquote style="text-align: left;"><p>@echo off<br />
IF dummy==dummy%1 (<br />
GOTO NOARGS<br />
) ELSE (<br />
IF dummy==dummy%2 (<br />
GOTO NOARGS<br />
)<br />
SET DB=%1<br />
SET PREFIX=%2<br />
SET HOST=YOUR_HOST<br />
SET USER=YOUR_DB_USER<br />
SET PASSWORD=YOUR_DB_PASSWORD<br />
IF dummy==dummy%3 (<br />
:: IF NOT SET PARAMETER 3<br />
SET EXPORT_FILE=export.sql<br />
) ELSE (<br />
:: IF SET PARAMETER 3<br />
SET EXPORT_FILE=%3<br />
)<br />
mysql -u %USER% –password=%PASSWORD% -e &quot;SHOW TABLES FROM %DB% LIKE '%PREFIX%%%'&quot; -N &gt; c:\windows\temp\mysql.temp<br />
IF EXIST %EXPORT_FILE% del %EXPORT_FILE%<br />
FOR /F &quot;eol=; &quot; %%i in (c:\windows\temp\mysql.temp) do (<br />
@echo %%i<br />
mysqldump -u %USER% –password=%PASSWORD% %DB% %%i &gt;&gt; %EXPORT_FILE%<br />
)<br />
IF EXIST c:\windows\temp\mysql.temp del c:\windows\temp\mysql.temp<br />
ECHO Export done<br />
GOTO :END<br />
:NOARGS<br />
ECHO YOU NEED AT LEAST 2 ARGS:<br />
ECHO 1ST ARG DB<br />
ECHO 2ND ARG PREFIX<br />
ECHO 3RD ARG EXPORT FILE NAME (DEFAULT: export.sql)<br />
:END</p></blockquote>
<p style="text-align: left;" dir="ltr">These scripts with three arguments: database, prefix (of the tables name) and export file, when the last is not required (default: in the current directory with file named export.sql). You'll need to enter the top of the script parameters like host, database, username and password to connection to the database.</p>
<p style="text-align: left;" dir="ltr">That's all for now</p>
<p style="text-align: left;" dir="ltr">Hope the guide was understandable, because most of it used google translation. If not, please ask questions under the post and I'll try to answer and update the guide. Later, i'll publish scripts for easy replication of a the and its databases, and also update Joomla and its database when Joomla update release (this update is done like any normal update, but in addition, you need to running the sed command).</p>
<p style="text-align: left;" dir="ltr">Site <a title="Israel Library Software" href="http://www.library.org.il" target="_blank">Agron BC&amp;C LTD</a> using this method to create multisite (see list of online libraries on the right).</p>
</div>]]></content:encoded>			<wfw:commentRss>http://oc666.net/2009/12/09/how-to-make-joomla-website-multisite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8235;סלקום &#8211; בגלל השירות?!&#8236;</title>		<link>http://oc666.net/2009/10/18/%d7%a1%d7%9c%d7%a7%d7%95%d7%9d-%d7%91%d7%92%d7%9c%d7%9c-%d7%94%d7%a9%d7%99%d7%a8%d7%95%d7%aa/</link>
		<comments>http://oc666.net/2009/10/18/%d7%a1%d7%9c%d7%a7%d7%95%d7%9d-%d7%91%d7%92%d7%9c%d7%9c-%d7%94%d7%a9%d7%99%d7%a8%d7%95%d7%aa/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 17:01:31 +0000</pubDate>
		<dc:creator>&#8235;oc666&#8236;</dc:creator>				<category><![CDATA[כללי]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[טלפון]]></category>
		<category><![CDATA[סלולרי]]></category>
		<category><![CDATA[סלקום]]></category>
		<category><![CDATA[שירות]]></category>

		<guid isPermaLink="false">http://oc666.net/?p=262</guid>
		<description><![CDATA[&#8235;לאחרונה, הטלפון הסלולרי של העבודה שלי, מוטורולה V5, עשה לי בעיות. כל מיני אתחולים באמצע שיחות, התנתקויות, אתחולים סתם בשביל הכיף ועוד שאר ירקות. זה נורמלי לטלפון כמעט בן 4 שעבר לא מעט בעלים. חשבתי לעצמי כמה גרוע כבר יכול להיות לקחת טלפון סלולרי לתיקון בחברת סלקום. כי הרי כל הזמן הם מתגאים בשירות שלהם [...]&#8236;]]></description>			<content:encoded><![CDATA[<div dir="rtl"><p>לאחרונה, הטלפון הסלולרי של העבודה שלי, מוטורולה V5, עשה לי בעיות. כל מיני אתחולים באמצע שיחות, התנתקויות, אתחולים סתם בשביל הכיף ועוד שאר ירקות. זה נורמלי לטלפון כמעט בן 4 שעבר לא מעט בעלים. חשבתי לעצמי כמה גרוע כבר יכול להיות לקחת טלפון סלולרי לתיקון ב<a title="אתר סלקום הרשמי" href="http://www.cellcom.co.il/" target="_blank">חברת סלקום</a>. כי הרי כל הזמן הם מתגאים בשירות שלהם ואפילו תלוי על הקיר באיזור השירות הטכני שלהם שלט ענק שמראה קטע מעיתון גלובס שהם הכי טובים בשירות.<span id="more-262"></span></p>
<p>הגעתי למרכז שירות סלקום מול קניון איילון. מרכז מפואר כשלעצמו למרות שהוא נמצא בתוך מרכז תעשיה מאוויל. בכניסה השומר נתן לי פתק עם המספר 410 לשירות הטכני. הגעתי לאיזור השירות טכני ולא כ&quot;כ הבנתי מי נגד מי. המספרים לא היו רציפים ובכלל כללו גם מספרים לשירותים אחרים. בנוסף המספרים בתור קפצו ללא סדר הגיוני כך שלא ידעתי בדיוק מתי מגיע תורי. לא הבנתי למה נתנו לי מספר בכלל אם המספרים קופצים מ-402 ל-626 וחוזרים פתאום ל-27 ואח&quot;כ ל-127. ללא ידיעה כמה זמן בערך נשאר לי לחכות. ושימו לב ש<strong>רק הגעתי לשים את הטלפון בתיקון</strong>. שירות כבר אמרנו?!</p>
<p>ישבתי לתומי וחיכיתי. המספרים המשיכו לקפץ בלי שום היגיון. למזלי בסלולרי האישי שלי יש אינטרנט ומיילים אז הפגתי את שעמומי בקריאת חדשות ועיון במיילים (היי, לפחות לא שיחקתי משחקים כמו <a title="מושב החורף של הכנסת 2009" href="http://www.nrg.co.il/online/1/ART1/954/294.html" target="_blank">השר שרוצה לחדור לנו פרטיות</a> ואנחנו עוד משלמים לו על המשחקים הללו).</p>
<p>כמובן שהצטרפו אלי אנשים לישיבה שהתחילו להתמרמר. הם התחילו לדבר עם המנהלים (חבל שאני לא עשיתי כך, לפעמים הסבלנות מהשטן). אחת טענה שבאורנג' לא קרה לה כך והתחילה לשכנע את האחרים שזה אכן כך. הצעקות והדיבורים עם המנהלים עזרו. פתאום החלו לקבל גם בשירות לקוחות ובעמדות שאינן שירות טכני. המספרים עדיין נתנו תחושה של הגרלת לוטו (אמריקאית). רק שכאן הזוכה הוא המפסיד ומי שלא זוכה גם מפסיד.</p>
<p>לאחר המתנה כוללת של חמישים וארבע דקות ו-6 שניות (<a title="שירות החניה של פנגו" href="http://www.4500.co.il" target="_blank">שירות החניה של פנגו</a> אישרר לי את זה &#8211; הוא מציג את משך הזמן החניה של כל חניה שביצעת) ותורידו 5 דקות שלקח לשים את המכשיר יצאתי מסלקום. עצבני ומאושר בחלקי (החלק שהטלפון האישי שלי אינו בסלקום). העיקר שסלקום מתחייבים על זמן תיקון של שעה וחצי למרות שגם ככה לקחתי אותו אחרי שני ימי עבודה. באמת שלא איכפת לי אם הזמן התיקון היה יום רק שזמן ההמתנה המעצבן יתקצר ל-10 דקות.</p>
<p>חזרתי לקחת את המכשיר. הפעם לא קיבלתי מספר. עמדה לקיחת מכשיר מתיקון אינה דורשת מספר. חבל אמרתי לעצמי. בפעם שעברה עליתי בגורל של ה&quot;<em>לוטו של סלקום&quot;</em> לאחר שעה. מעניין מה יקרה בלי מספר. עצבני בחלקי מהפעם הקודמת, הבנתי כי הפעם יהיה קשה ואכן כך היה. חיכיתי חצי שעה בתור שנפרס על פני שתי עמדות. כמובן שהישראלי המצוי (שהגיח לפתע) ניסה להידחף לפני. די התעצבנתי. אז נדחפתי גם כן ולא נתתי לו את האושר של הישראלי ה<strong>פרימיטיבי</strong>. שמתי לב כי מי שטופל לפני בכלל לא בא לשים מכשיר ולא לקחת (שירות כבר אמרתי?). בשעה טובה, לאחר שעה ועשרים וחמש דקות (<a title="פנגו - שירות חניה באמצעות הסלולרי" href="http://www.4500.co.il/" target="_blank">פנגו</a> כבר אמרתי) של המתנה כוללת-לשים ולקחת- הטלפון יצא מתיקון. אה&#8230; ועוד שני ימי עבודה שגם ככה הטלפון היה אמור לחכות. בגללי. לא בגלל סלקום (אתם יודעים בן אדם עסוק מידי פעם).</p>
<p><em><strong>גילוי נאות</strong></em>: אין לי שום קשר עסקי או אישי עם מישהו שמנהל, עובד או בעל קשר לחברות, שיוצא לו רווח כלשהו מהביקורת שנאמרה לעיל. הנני לקוח של אורנג' במגזר הפרטי ולקוח של סלקום במגזר העסקי.</p>
</div>]]></content:encoded>			<wfw:commentRss>http://oc666.net/2009/10/18/%d7%a1%d7%9c%d7%a7%d7%95%d7%9d-%d7%91%d7%92%d7%9c%d7%9c-%d7%94%d7%a9%d7%99%d7%a8%d7%95%d7%aa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
