eZpedia : Solutions
https://ezpedia.org
Solutionsen-GBUpgrading eZ Publish 3.3 t o 3.9
https://ezpedia.org/solution/upgrading_ez_publish_3_3_t_o_3_9
https://ezpedia.org/solution/upgrading_ez_publish_3_3_t_o_3_9<a name="eztoc381305_1" id="eztoc381305_1"></a><h2>Prerequisits</h2>
<ul>
<li>If you need to upgrade eZ, start here:</li>
<li><a href="https://ez.no/doc/ez_publish/upgrading" target="_self">https://ez.no/doc/ez_publish/upgrading</a></li>
</ul>
<ul>
<li>Examine this image carefully:</li>
<li><a href="https://ez.no/doc/layout/set/full/ez_publish/upgrading/images/ez_publish_releases" target="_self">https://ez.no/doc/layout/set/full/ez_publish/upgrading/images/ez_publish_releases</a></li>
</ul>
<a name="eztoc381305_2" id="eztoc381305_2"></a><h2>Requirements </h2>
<ul>
<li><b>Backup the database!</b></li>
</ul>
<a name="eztoc381305_3" id="eztoc381305_3"></a><h2><b>Steps</b></h2>
<ul>
<li>Then, open Notepad and list your upgrade path, with every stop. You can then copy and paste out of Notepad onto the command line.</li>
<li>Pay particular attention to the scripts listed on each page (for example: upgrading from 3.3-5 to 3.4). </li>
<li>Some of the scripts don't run (due to version conflicts), and some are optional. Read the pages in the upgrade documentation carefully - or you'll have to do it over and over. </li>
<li>Take your time and be patient. The commands below are an example, you'll need to substitute your database access parameters as well as the siteaccess names. </li>
</ul>
<p>
Commands will vary between different upgrade paths.
</p>
<pre class="" style="font-family:monospace;">mysql -udb_ez -p db_ez < update/database/mysql/<span style="">3.4</span>/dbupdate-<span style="">3.3</span>-<span style="">5</span>-to-3.4.0.sql
php-cli update/common/scripts/updateremoteid.php
php-cli update/common/scripts/updatesession.php
php-cli update/common/scripts/updatetoplevel.php
php-cli update/common/scripts/addorderemail.php
mysql -udb_ez -p db_ez < update/database/mysql/<span style="">3.4</span>/dbupdate-3.4.0-to-3.4.1.sql
mysql -udb_ez -p db_ez < update/database/mysql/<span style="">3.4</span>/dbupdate-3.4.1-to-3.4.2.sql
mysql -udb_ez -p db_ez < update/database/mysql/<span style="">3.4</span>/dbupdate-3.4.2-to-3.4.3.sql
mysql -udb_ez -p db_ez < update/database/mysql/<span style="">3.4</span>/dbupdate-3.4.3-to-3.4.4.sql
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.5</span>/dbupdate-3.4.4-to-3.5.0.sql
php-cli update/common/scripts/updateiscontainer.php -s new
php-cli update/common/scripts/updateniceurls.php
php-cli update/common/scripts/updatesearchindex.php --clean
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.5</span>/dbupdate-3.5.0-to-3.5.1.sql
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.5</span>/dbupdate-3.5.1-to-3.5.2.sql
php-cli update/common/scripts/updatetoplevel.php -s adm
php-cli update/common/scripts/updateeztimetype.php -s new
php-cli update/common/scripts/updatecrc32.php
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.6</span>/dbupdate-3.5.2-to-3.6.0.sql
php-cli update/common/scripts/convertxmllinks.php
php-cli update/common/scripts/updaterelatedobjectslinks.php -s adm
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.8</span>/dbupdate-3.6.0-to-3.8.0.sql
php-cli update/common/scripts/updatemultilingual.php -s new
php-cli update/common/scripts/updaterssimport.php -s new
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.8</span>/dbupdate-3.8.0-to-3.8.1.sql
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.8</span>/dbupdate-3.8.1-to-3.8.2.sql
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.8</span>/dbupdate-3.8.2-to-3.8.3.sql
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.8</span>/dbupdate-3.8.3-to-3.8.4.sql
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.8</span>/dbupdate-3.8.4-to-3.8.5.sql
mysql -u db_ez -p db_ez < update/database/mysql/<span style="">3.8</span>/dbupdate-3.8.5-to-3.8.6.sql
php-cli update/common/scripts/correctxmltextclasses.php --global</pre><a name="eztoc381305_3_1" id="eztoc381305_3_1"></a><h3>Results</h3>
<p>
I upgraded from 3.3-5 to 3.8.6 and it went fairly smoothly.
</p>
<a name="eztoc381305_4" id="eztoc381305_4"></a><h2>Problems</h2>
<p>
Issues I did encounter
</p>
<ul>
<li>updatetoplevel.php updated <b>override/content.ini.append.php</b> like so, and the system didn't run well. (I commented the changes out):</li>
</ul>
<pre class="" style="font-family:monospace;">#<span class="br0">[</span>NodeSettings<span class="br0">]</span>
#RootNode=<span style="">4159</span>
#UserRootNode=<span style="">4160</span>
#MediaRootNode=<span style="">4161</span>
#SetupRootNode=<span style="">4163</span>
#DesignRootNode=<span style="">4162</span></pre><a name="eztoc381305_4_2" id="eztoc381305_4_2"></a><h3>Results</h3>
<p>
updateiscontainer.php didn't run, and although I normally don't make changes in the database - I changed the ezcontentclass table and set the <b>is_container</b> flag manually.
</p>
<ul>
<li>At this time, you should be able to use the admin console. </li>
<li>Go to Setup > Upgrade > and check the database consistency. </li>
<li>Manually run any SQL through the database engine.</li>
<li>Clearing the cache and updating the search index are important.</li>
</ul>
Sun, 09 Aug 2009 10:23:08 GMTLimiting Payment Gateways by Product Content Class
https://ezpedia.org/solution/limiting_payment_gateways_by_product_content_class
https://ezpedia.org/solution/limiting_payment_gateways_by_product_content_class<a name="eztoc380629_1" id="eztoc380629_1"></a><h2>
<div class="object-center">
<p class="editor_motivation">
This is a <a href="/en/template/stub">Stub</a> article. Help the eZ Publish community by expanding it!
</p>
</div></h2><a name="eztoc380629_2" id="eztoc380629_2"></a><h2>About</h2>
<p>
I am using the xrowecommerce extension from xrow and the paymentgateway directebanking which is written by all2e in order of us (wirverbindenwelten).
</p>
<p>
For a special shopmodification I need to have a paymentlimitaion by productclass.
</p>
<p>
This example is using a modified xrowecommerce extension.
</p>
<p>
in the paymentgateway event php I add the following to the execute function
</p>
<pre class="eztemplate" style="font-family:monospace;">$productPayment = $order->attribute( 'product_items' );</pre>
<p>
Also add the variable $productPayment to template through $process->Template['templateVars']
</p>
<pre class="eztemplate" style="font-family:monospace;">$process->Template['templateVars'] = array(
'event' => $event, 'product_gateway_limitation' => $productPayment
);</pre>
<p>
After this I check my product class in the template file selectgateway.tpl
</p>
<p>
by looping the product items in my $productPayment array as needed.
</p>
<p>
If u need help u are welcome in irc://irc.freenode.net#ezpublish and irc://irc.freenode.net#ezpublish.de
</p>
<a name="eztoc380629_3" id="eztoc380629_3"></a><h2>References</h2>
<ul>
<li>Forum: <a href="https://ez.no/developer/forum/setup_design/paymentgateway_in_xrowecommerce_plz_move_to_developer" target="_self">paymentgateway in xrowecommerce</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/developer/closed_shop_checkout_hidden_value_to_selectgateway_tpl" target="_self">shop checkout -> hidden value to selectgateway.tpl</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/setup_design/i_want_to_offer_several_payment_method_workflow_limitation" target="_self">I want to offer several payment method - workflow limitation</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/developer/payment_gateway_based_on_price" target="_self">payment gateway based on price</a></li>
<li>Project: <a href="https://projects.ez.no/xrowecommerce" target="_self">xrowecommerce</a></li>
</ul>
Thu, 06 Aug 2009 11:11:46 GMTHow to shrink or reduce the site of eZ Publish database backup dump files
https://ezpedia.org/solution/how_to_shrink_or_reduce_the_site_of_ez_publish_database_backup_dump_files
https://ezpedia.org/solution/how_to_shrink_or_reduce_the_site_of_ez_publish_database_backup_dump_files<a name="eztoc375981_1" id="eztoc375981_1"></a><h2>Question</h2>
<p>
I have a small site like a blog with only a few hundred entries. My mysql database backup dump files have grown in size upwards to over 1,000 MB! How can I reduce the size or amount of data stored in the eZ Publish Database?
</p>
<a name="eztoc375981_2" id="eztoc375981_2"></a><h2>Answers</h2>
<p>
Sadly the size is quite common. We have seen much larger sizes in the GB of exports of active clean eZ Publish installation databases. Suggest reading up on the flatten.php an cleanup.php php cli shell scripts as these should help you reduce some database size.
</p>
<a name="eztoc375981_3" id="eztoc375981_3"></a><h2>Suggested steps</h2><a name="eztoc375981_3_1" id="eztoc375981_3_1"></a><h3>- Empty the trash for all users</h3><a name="eztoc375981_3_2" id="eztoc375981_3_2"></a><h3>- Run flatten.php and cleanup.php scripts</h3><a name="eztoc375981_3_3" id="eztoc375981_3_3"></a><h3>- Remove session information from database</h3>
<p>
eZ Publish will store session information in the database and you may need to enable the php configuration setting, 'session.gc_probability' to purge the expired sessions.
</p>
<a name="eztoc375981_3_3_1" id="eztoc375981_3_3_1"></a><h4>PHP Sessions</h4>
<p>
Confirm these values in php.ini
</p>
<pre class="ini" style="font-family:monospace;">session.gc_probability <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span>
session.gc_divisor <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 100</span></pre><a name="eztoc375981_3_3_2" id="eztoc375981_3_3_2"></a><h4>eZ Publish Sessions</h4>
<p>
If you dump your database and review the file size and then review the contents you would find that the ezsession table often contains large amounts of session rows.
</p>
<a name="eztoc375981_3_3_2_1" id="eztoc375981_3_3_2_1"></a><h5>Mysql</h5>
<p>
You can quickly truncate the ezsession table using sql thus freeing the table of records.
</p>
<pre class="ini" style="font-family:monospace;">mysql > truncate table ezsession<span style="color: #666666; font-style: italic;">;</span></pre><a name="eztoc375981_3_3_2_2" id="eztoc375981_3_3_2_2"></a><h5>PHP</h5>
<p>
Or you may use the eZ Publish PHP CLI API (cleanup script) to free sessions in eZ Publish.
</p>
<pre class="ini" style="font-family:monospace;">php update/common/scripts/cleanup.php session<span style="color: #666666; font-style: italic;">;</span>
php update/common/scripts/cleanup.php expired_session<span style="color: #666666; font-style: italic;">;</span></pre><a name="eztoc375981_4" id="eztoc375981_4"></a><h2>Reference</h2>
<ul>
<li>Doc: <i><a href="https://ez.no/doc/ez_publish/upgrading/the_system_upgrade_scripts" title="https://ez.no/doc/ez_publish/upgrading/the_system_upgrade_scripts" target="_self">https://ez.no/doc/ez_publish/upgrading/the_system_upgrade_scripts</a></i></li>
<li>Forum: <a href="https://ez.no/developer/forum/general/huge_database#msg189613" title="Posted by: Christian Johansen: Yeah, I know. At first I was certain that my data had been corrupted, but it" target="_self">Huge database</a></li>
</ul>
Sun, 19 Jul 2009 18:38:48 GMTeZ ODF - Creating, Importing and Exporting ODF/PDF Documents
https://ezpedia.org/solution/ez_odf_creating_importing_and_exporting_odf_pdf_documents
https://ezpedia.org/solution/ez_odf_creating_importing_and_exporting_odf_pdf_documents<a name="eztoc374997_1" id="eztoc374997_1"></a><h2>About</h2><a name="eztoc374997_2" id="eztoc374997_2"></a><h2>Summary</h2><a name="eztoc374997_3" id="eztoc374997_3"></a><h2>References</h2>Fri, 17 Jul 2009 11:41:35 GMTConverting HTML Form Post Variables into URL View Parameters
https://ezpedia.org/solution/converting_html_form_post_variables_into_url_view_parameters
https://ezpedia.org/solution/converting_html_form_post_variables_into_url_view_parameters
<div class="object-center">
<p class="version_info">
This feature is available since <a href="/en/ez/ez_publish_3_5" target="_self">eZ publish 3.5</a>.
</p>
</div><a name="eztoc360837_1" id="eztoc360837_1"></a><h2>About</h2>
<p>
A recommended feature within eZ Publish template language is the use of view parameters instead of ezhttp operators to access _GET or _POST variables. <a href="/en/ez/view_parameters" target="_self">View parameters</a> are eZ Publish cache friendly while ezhttp usage is not.
</p>
<a name="eztoc360837_1_1" id="eztoc360837_1_1"></a><h3>Example Problem</h3>
<p>
Often a problem arises during requirements analysis and development with eZ Publish is how to submit complex combinations of view parameters as _POST variables and transform those variables into view parameters and redirecting the browser.
</p>
<p>
An example of this might be a filter bar which limits the results of a fetch with a series of html form inputs and options.
</p>
<p>
This document should provide an example of turning the html form _POST variables into view parameters.
</p>
<a name="eztoc360837_2" id="eztoc360837_2"></a><h2>Solutions</h2>
<p>
At the end of the day this requires either using one of the following
</p>
<ul>
<li>javascript onSubmit/onClick solution (incompatible with text browsers to append parameters and redirect browser)</li>
<li>custom module view (compatible with all browsers and simple to create)</li>
<li>default '/content/action' module view in eZ Publish to provide this parameter type translation/redirection. </li>
</ul>
<a name="eztoc360837_2_2" id="eztoc360837_2_2"></a><h3>Default /content/action module view</h3>
<p>
This module view is provided in the default kernel but has some limitations
</p>
<a name="eztoc360837_2_2_1" id="eztoc360837_2_2_1"></a><h4>Variables</h4>
<ul>
<li>DestinationURL - This is the path to your view without starting slash. Don't use ezurl on this value as it would add a starting slash. </li>
<li>Parameter - Any input variable with the name ie, 'Example #1 In a custom template for the node uri, 'ez_publish_root_node/events'</li>
<li>Submit - This parameter is ignored and not translated. Apparently this includes multiple values with the same name.</li>
<li>All other parameters submitted within the html form elements be added with the /([name])/[value] view parameters format.</li>
</ul>
<a name="eztoc360837_2_2_2" id="eztoc360837_2_2_2"></a><h4>Example Form</h4> <pre class="eztemplate" style="font-family:monospace;"><form action=<span style="color: #66cc66;">{</span><span style="color: #dd0000;">"content/action"</span><span style="color: #66cc66;">|</span>ezurl<span style="color: #66cc66;">}</span> method="post">
<input type="hidden" name="DestinationURL" value="<span style="color: #66cc66;">{</span><span style="color: #0000bb;">$node</span>.<span style="color: #006600;">url_alias</span><span style="color: #66cc66;">}</span>" />
<input type="text" name="(keyword)" value="" size="12" /> <br />
<input type="checkbox" name="(year)" value="1999" /> <br />
<input type="checkbox" name="(month)" value="12" /> <br />
<input type="submit" name="Submit" value="Go" />
</form></pre><a name="eztoc360837_2_2_3" id="eztoc360837_2_2_3"></a><h4>Result</h4>
<p>
Upon submit the user will be redirected to: 'ez_publish_root_node/events/(keyword)//(year)/1999/(month)/12' if both checkboxes are checked and no text is input.
</p>
<a name="eztoc360837_2_2_4" id="eztoc360837_2_2_4"></a><h4>Limitations and Problems</h4>
<p>
The primary problem with the default 'content/action' module solution is certain html form input _POST values are converted inconsistently due to the generic nature of the solution provided by default.
</p>
<p>
Checkboxes are only submitted if checked, textline could be optional and on submit send empty values and cause further user page loading / redirection problems.
</p>
<p>
These problems at any level require custom php to properly detect, evaluate and set reliable url + view parameters hence the recommendation to use the <i>bcposttoview</i> custom module solution if these limitations affect you and your code.
</p>
<a name="eztoc360837_2_3" id="eztoc360837_2_3"></a><h3>Custom module view</h3>
<p>
You could create a custom module view within an extension activated for your user siteaccess to provide custom redirection implementation (review the file kernel/content/action.php for the default example).
</p>
<p>
At some point I hope for someone to publish at least an example of such a solution for further modification as needed by the user / developer as a starting point for avoiding null values in url parameters in redirected url (a common short coming of using the default /content/action module method).
</p>
<a name="eztoc360837_2_3_5" id="eztoc360837_2_3_5"></a><h4>Example Solution</h4>
<p>
<i>2009.09.20</i> Brookins Consulting published the <a href="https://projects.ez.no/bcposttoview" target="_blank">bcposttoview</a> module view extension which was an example (several in fact) self contained modules and module views within the bcposttoview extension. The name mirrored off of an old deprecated module view name ezposttoview mentioned online in conjunction as an older example of this functionality but not available to the public, while our bcposttoview is freely available example in response to the for mentioned need (above).
</p>
<a name="eztoc360837_2_4" id="eztoc360837_2_4"></a><h3>Javascript redirection</h3>
<p>
You could use javascript to convert html form variables into view parameters. This would be better when used in conjunction with ajax content request than simply html form variables to url variable conversion to avoid the need for a custom module view for redirection.
</p>
<p>
In the end we think a module view redirection provides better browser compatibility than javascript hands down. Although a javascript solution (or ajax solution) was used on top of the module view solution that would be just fine since it provides a reliable fallback for browsers without javascript.
</p>
<a name="eztoc360837_2_4_6" id="eztoc360837_2_4_6"></a><h4>Example Javascript Method #1 </h4> <pre class="eztemplate" style="font-family:monospace;">function defaultStaticFormToViewParameterUrlRedirect( suffixString = '' )
<span style="color: #66cc66;">{</span>
var <span style="color: #007700;">form</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'form_search'</span> + suffixString <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">action</span><span style="color: #66cc66;">=</span>form.<span style="color: #006600;">action</span>;
var <span style="color: #007700;">todaySelect</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'(today)'</span> + suffixString <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">locationSelect</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'(location)'</span> + suffixString <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">keywordSelect</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'(keyword)'</span> + suffixString <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">eventTypeSelect</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'(eventType)'</span> + suffixString <span style="color: #66cc66;">)</span>;
<a href="https://ez.no/doc/content/advancedsearch?SearchText=if&SearchContentClassID=23"><span style="color: #0600FF;">if</span></a> <span style="color: #66cc66;">(</span>todaySelect.<span style="color: #006600;">value</span><span style="color: #66cc66;">)</span>
<span style="color: #66cc66;">{</span>
action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(today)/'</span> + escape<span style="color: #66cc66;">(</span> todaySelect.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if (locationSelect.value)
<span style="color: #66cc66;">{</span>
action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(location)/'</span> + escape<span style="color: #66cc66;">(</span> locationSelect.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if (keywordSelect.value)
<span style="color: #66cc66;">{</span>
action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(keyword)/'</span> + escape<span style="color: #66cc66;">(</span> keywordSelect.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if (eventTypeSelect.value)
<span style="color: #66cc66;">{</span>
action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(eventType)/'</span> + escape<span style="color: #66cc66;">(</span> eventTypeSelect.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
form.action=action;
}</pre><a name="eztoc360837_2_4_6_1" id="eztoc360837_2_4_6_1"></a><h5>Example Javascript Form (with fallback)</h5> <pre class="eztemplate" style="font-family:monospace;"><form action=<span style="color: #66cc66;">{</span><span style="color: #dd0000;">"content/action"</span><span style="color: #66cc66;">|</span>ezurl<span style="color: #66cc66;">}</span> method="post" onsubmit="defaultStaticFormToViewParameterUrlRedirect( '' )">
<input type="hidden" name="DestinationURL" value="<span style="color: #66cc66;">{</span><span style="color: #0000bb;">$node</span>.<span style="color: #006600;">url_alias</span><span style="color: #66cc66;">}</span>" />
<input type="text" name="(keyword)" value="" size="12" /> <br />
<input type="checkbox" name="(year)" value="1999" /> <br />
<input type="checkbox" name="(month)" value="12" /> <br />
<input type="submit" name="Submit" value="Go" />
</form></pre><a name="eztoc360837_2_4_7" id="eztoc360837_2_4_7"></a><h4>Example Javascript Method #2 </h4> <pre class="eztemplate" style="font-family:monospace;">function eventFilter( i )
<span style="color: #66cc66;">{</span>
var <span style="color: #007700;">filter</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'EventFilter'</span> <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">filter_action</span><span style="color: #66cc66;">=</span>filter.<span style="color: #006600;">action</span>;
var <span style="color: #007700;">offset</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'Offset'</span> <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">date</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'Date'</span> <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">city</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'City'</span> <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">state</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'State'</span> <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">country</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'Country'</span> <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">production</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'Production'</span> <span style="color: #66cc66;">)</span>;
var <span style="color: #007700;">coordinator</span><span style="color: #66cc66;">=</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'Coordinator'</span> <span style="color: #66cc66;">)</span>;
<a href="https://ez.no/doc/content/advancedsearch?SearchText=if&SearchContentClassID=23"><span style="color: #0600FF;">if</span></a> <span style="color: #66cc66;">(</span> offset.<span style="color: #006600;">value</span> !<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'0'</span> <span style="color: #66cc66;">)</span>
<span style="color: #66cc66;">{</span>
filter_action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(offset)/'</span> + escape<span style="color: #66cc66;">(</span> offset.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if ( date.value != 'all' )
<span style="color: #66cc66;">{</span>
filter_action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(date)/'</span> + escape<span style="color: #66cc66;">(</span> date.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if ( city.value != 'all' )
<span style="color: #66cc66;">{</span>
filter_action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(city)/'</span> + escape<span style="color: #66cc66;">(</span> city.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if ( state.value != 'all' )
<span style="color: #66cc66;">{</span>
filter_action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(state)/'</span> + escape<span style="color: #66cc66;">(</span> state.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if ( country.value != 'all' )
<span style="color: #66cc66;">{</span>
filter_action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(country)/'</span> + escape<span style="color: #66cc66;">(</span> country.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if ( production.value != 'all' )
<span style="color: #66cc66;">{</span>
filter_action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(production)/'</span> + escape<span style="color: #66cc66;">(</span> production.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
if ( coordinator.value != 'all' )
<span style="color: #66cc66;">{</span>
filter_action +<span style="color: #66cc66;">=</span> <span style="color: #dd0000;">'/(coordinator)/'</span> + escape<span style="color: #66cc66;">(</span> coordinator.<span style="color: #006600;">value</span> <span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>
filter.action=filter_action;
}
</pre><a name="eztoc360837_3" id="eztoc360837_3"></a><h2>Reference</h2>
<ul>
<li>Custom module view Example Solution: <a href="https://projects.ez.no/bcposttoview" target="_blank">bcposttoview</a></li>
<li>Custom design template Example Solution <a href="https://projects.ez.no/bceventfilter" target="_blank">bceventfilter</a> (Filter Bar and Results Display Examples)</li>
<li>Old Doc (Read comments), <a href="https://ez.no/ezpublish/documentation/incoming/http_post_to_url_conversion" target="_self">HTTP Post to URL conversion</a></li>
<li>Doc: Module <a href="https://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/modules_and_views#view_parameters" target="_self">View Parameters</a></li>
<li>Doc: Basic template tasks, <a href="https://ez.no/doc/ez_publish/technical_manual/4_0/templates/basic_template_tasks#eztoc86760_4" target="_self">Custom view parameters</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/setup_design/filter_content_passing_values_from_url" target="_blank">Filter content passing values from URL</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/setup_design/content_filtering" target="_blank">Content Filtering</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/developer/best_way_to_multi_filter" target="_blank">Best way to multi filter</a></li>
<li>Search: <a href="https://www.google.com/search?q=ezposttoview" target="_blank">Older mentions of an ezsystems module view called 'ezposttoview'</a> which provided a custom module view solution for a time on ez.no which has since been deprecated (and further more was never publicly released)</li>
</ul>
Sat, 20 Jun 2009 19:01:46 GMTSwitching to rewrite rules
https://ezpedia.org/solution/switching_to_rewrite_rules
https://ezpedia.org/solution/switching_to_rewrite_rules
<p>
If you're switching from a setup where index.php is occuring in the URL, to a rewrite rule based setup, you can make sure any old links are properly redirected (with HTTP status MOVED PERMANENTLY) to the new URL without index.php. Put this in the appropriate virtual host context of your Apache configuration:
</p>
<pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteRule</span> ^/index\.php/(.*)$ /$<span style="color: #ff0000;">1</span> [L,R=<span style="color: #ff0000;">301</span>]
</pre>Wed, 11 Feb 2009 15:42:24 GMTRunning cronjobs and scripts with parameters in limited environment
https://ezpedia.org/solution/running_cronjobs_and_scripts_with_parameters_in_limited_environment
https://ezpedia.org/solution/running_cronjobs_and_scripts_with_parameters_in_limited_environment<a name="eztoc316316_1" id="eztoc316316_1"></a><h2>Question</h2>
<p>
How can I run eZ Publish scripts and cronjobs with parameters on shared hosting without ssh.
</p>
<p>
You may only be allowed to run php files as a cronjob without any parameters and without the possibility to browse eZ Publish directory.
</p>
<p>
You also may not have command line access. Yeah, this can be pretty frustrating, but can not find or afford a better hosting solution.
</p>
<a name="eztoc316316_2" id="eztoc316316_2"></a><h2>Solution</h2>
<p>
When your provider doesn't allow you to run cronjob tasks with parameters and when your server runs php-cgi.
</p>
<p>
In order to run cronjob task with parameters, you can create a separate php file and then create a cronjob task pointing to that file.
</p>
<a name="eztoc316316_2_1" id="eztoc316316_2_1"></a><h3>Custom Script Example</h3>
<p>
Here is an example of the solution using the data_import extension as an example.
</p>
<p>
File: <i> /path/to/ezpublish/extensions/custom/cronjobs/run_custom_cronjob_script.php</i>
</p>
<pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;"><</span>?php
<span style="color: #007800;">$output</span> = shell_exec<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #ff0000;">'cd /path/to/ezpublish/; /path/to/php5 runcronjobs.php import_images_csv'</span><span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"<pre><span style="color: #007800;">$output</span></pre>"</span>;
?<span style="color: #000000; font-weight: bold;">></span></pre>
<p>
The above example creates an output (as seen in the code) so you will know if your import is successful or not.
</p>
<a name="eztoc316316_2_2" id="eztoc316316_2_2"></a><h3>Web Browser Example</h3>
<p>
You may for very small tasks be able to run the above file from a web browser as long as the script completes quickly as browser requests do not work well with long running tasks.
</p>
<p>
The following tasks have been reported to be able to be run from the web browser with success if only limited. Most successes have been reported to resolve around limited execution time.
</p>
<ul>
<li>Scripts: Custom Scripts - <i>Try limiting the execution time</i> </li>
<li>Cronjobs: Data Import - Try limiting how much complicated data import you attempt each time </li>
<li>Database: Dump / Load / Custom SQL- <i>Try using phpmyadmin or other dba tools</i> </li>
</ul>
<a name="eztoc316316_3" id="eztoc316316_3"></a><h2>References</h2>
<ul>
<li><a href="/en/ez/cronjob" target="_self">Cronjobs</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/developer/running_cronjobs_php_with_parameters_in_limited_environment#msg179130" title="Posted by: Noicokuna Niemoge: Hello; I just wanted to share one solution: running cronjobs when your provider doesn" target="_self">Running cronjobs.php with parameters in limited environment (shared hosting/cpanel)</a> </li>
</ul>
Fri, 09 Jan 2009 14:15:30 GMTClear Cache in eZ Publish
https://ezpedia.org/solution/clear_cache_in_ez_publish
https://ezpedia.org/solution/clear_cache_in_ez_publish<a name="eztoc312302_1" id="eztoc312302_1"></a><h2>Introduction</h2>
<p>
How to clear cache using eZ Publish 4
</p>
<a name="eztoc312302_2" id="eztoc312302_2"></a><h2>Administration</h2>
<p>
Use the website administration interphase to clear all cache via a gui.
</p>
<ol>
<li>Simply navigate to Setup tab</li>
<li>Click the clear cache icon</li>
<li>Refresh browser window of website</li>
</ol>
<a name="eztoc312302_3" id="eztoc312302_3"></a><h2>Command line</h2>
<p>
If you know how to use the command line you can use it to clear cache.
</p>
<a name="eztoc312302_3_1" id="eztoc312302_3_1"></a><h3>Unix</h3>
<p>
If you are using a complete unix like operating system you can use the following command to clear and purge all cache within eZ Publish.
</p>
<pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>ezpublish;
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>ezcache.php <span style="color: #660033;">--clear-all</span> --purge;</pre><a name="eztoc312302_3_2" id="eztoc312302_3_2"></a><h3>Windows</h3>
<p>
If you are using Windows you can use the following command to clear and purge all cache within eZ Publish.
</p>
<pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd c:/web/pro/ezpublish/doc;</span>
c:\php\php .<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>ezcache.php <span style="color: #660033;">--clear-all</span> --purge;</pre><a name="eztoc312302_4" id="eztoc312302_4"></a><h2>Manual</h2>
<p>
If you are unable to use the administration gui or command line to clear cache, you can still remove the cache files manually.
</p>
<pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>ezpublish;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-vrf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-vrf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>ezwebin_site<span style="color: #000000; font-weight: bold;">/</span>cache</pre><a name="eztoc312302_5" id="eztoc312302_5"></a><h2>Specific: Clearing image alias cache</h2>
<p>
If you are unable to use the administration gui you can use this command line to clear this specific combination / type of cache.
</p>
<pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>ezpublish;
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>ezcache.php <span style="color: #660033;">--clear-id</span>=imagealias --clear-all;
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>ezcache.php <span style="color: #660033;">--clear-id</span>=imagealias <span style="color: #660033;">--clear-all</span> --purge;
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>ezcache.php <span style="color: #660033;">--clear-all</span> --purge;
</pre>
<p>
The above example commands suggested in the forum.
</p>
<a name="eztoc312302_6" id="eztoc312302_6"></a><h2>References</h2>
<ul>
<li>Doc: <a href="https://ez.no/doc/ez_publish/technical_manual/4_0/features/view_caching/clearing_the_view_cache" target="_self"><i>Clearing</i> the view <i>cache</i> / View <i>caching</i> / Features / 4.0 ...</a> </li>
<li>Doc: <a href="https://ez.no/doc/ez_publish/technical_manual/4_0/reference/scripts/generic/ezcache_php" target="_self">ezcache.php / Generic / Scripts / Reference / 4.0 / Technical <b>...</b></a></li>
<li>Forum: <a href="https://ez.no/developer/forum/general/clear_cache_with_a_command_line#msg189632" title="Posted by: kracker: I hate typing all those long paths all the time! I make a symbolic link to the script in the ezpublish root directory. <code>cd /web/dev/ez; ln -s bin/php/ezcache.php clr;</code>Cheers, <i>//kracker</i>" target="_self">Clear cache with a command line</a></li>
</ul>
Wed, 17 Dec 2008 23:38:54 GMTPublishing static pages from eZ Publish
https://ezpedia.org/solution/publishing_static_pages_from_ez_publish
https://ezpedia.org/solution/publishing_static_pages_from_ez_publish<a name="eztoc305224_1" id="eztoc305224_1"></a><h2>Question</h2>
<p>
How does one publish static pages from a completed eZ Publish website installation?
</p>
<a name="eztoc305224_2" id="eztoc305224_2"></a><h2>Suggestion</h2>
<p>
Read the following reference and suggestion example.
</p>
<a name="eztoc305224_2_1" id="eztoc305224_2_1"></a><h3>Example</h3>
<p>
I used this to produce an inexpensive visual preview of a customer's eZ Publish website.
</p>
<pre class="bash" style="font-family:monospace;">httrack http:<span style="color: #000000; font-weight: bold;">//</span>ez <span style="color: #660033;">-O</span> <span style="color: #ff0000;">"."</span> -<span style="color: #000000; font-weight: bold;">%</span>v -<span style="color: #000000; font-weight: bold;">*</span>layout<span style="color: #000000; font-weight: bold;">*</span> -<span style="color: #000000; font-weight: bold;">*</span>Calendar<span style="color: #000000; font-weight: bold;">/*</span> -<span style="color: #000000; font-weight: bold;">*</span>visual<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #660033;">--footer</span> <span style="color: #ff0000;">""</span> <span style="color: #660033;">--preserve</span>
</pre><a name="eztoc305224_3" id="eztoc305224_3"></a><h2>References</h2>
<ul>
<li>Form: <a href="https://ez.no/developer/forum/general/publishing_static_pages#msg172492" target="_self">Publishing static pages</a> </li>
</ul>
Thu, 13 Nov 2008 01:34:44 GMTHow to handle Information Collection in template.
https://ezpedia.org/solution/how_to_handle_information_collection_in_template
https://ezpedia.org/solution/how_to_handle_information_collection_in_template<a name="eztoc237959_1" id="eztoc237959_1"></a><h2>Solution</h2>
<p>
This piece of template code iterating the already stored and collected information has only the purpose of demonstration.
</p>
<pre class="eztemplate" style="font-family:monospace;"><span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$collection</span><span style="color: #66cc66;">=</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=fetch&SearchContentClassID=31"><span style="color: #0600FF;">fetch</span></a><span style="color: #66cc66;">(</span><span style="color: #dd0000;">'content'</span>,<span style="color: #dd0000;">'collected_info_list'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=hash&SearchContentClassID=31"><span style="color: #0600FF;">hash</span></a><span style="color: #66cc66;">(</span><span style="color: #dd0000;">'object_id'</span>, <span style="color: #0000bb;">$obj</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=foreach&SearchContentClassID=23"><span style="color: #0600FF;">foreach</span></a> <span style="color: #0000bb;">$collection</span> as <span style="color: #0000bb;">$col</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><span style="color: #0000bb;">$col</span>.<span style="color: #006600;">creator</span>.<span style="color: #006600;">contentobject</span>.<span style="color: #006600;">name</span><span style="color: #66cc66;">|</span>wash<span style="color: #66cc66;">}</span> <span style="color: #808080; font-style: italic;">{* name of the user who stored something into the i.c. *}</span>
<span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=foreach&SearchContentClassID=23"><span style="color: #0600FF;">foreach</span></a> <span style="color: #0000bb;">$col</span>.<span style="color: #006600;">attributes</span> as <span style="color: #0000bb;">$colAttr</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><span style="color: #0000bb;">$colAttr</span>.<span style="color: #006600;">contentclass_attribute_name</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=attribute_result_gui&SearchContentClassID=34"><span style="color: #0600FF;">attribute_result_gui</span></a> <span style="color: #007700;">view</span><span style="color: #66cc66;">=</span>info <span style="color: #007700;">attribute</span><span style="color: #66cc66;">=</span><span style="color: #0000bb;">$colAttr</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><span style="color: #66cc66;">/</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=foreach&SearchContentClassID=23"><span style="color: #0600FF;">foreach</span></a><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><span style="color: #66cc66;">/</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=foreach&SearchContentClassID=23"><span style="color: #0600FF;">foreach</span></a><span style="color: #66cc66;">}</span>
</pre><a name="eztoc237959_2" id="eztoc237959_2"></a><h2>References</h2>
<ul>
<li>Doc: N/a</li>
</ul>
Mon, 04 Feb 2008 23:11:45 GMTFetching ezimage datatype image alias properties using PHP
https://ezpedia.org/solution/fetching_ezimage_datatype_image_alias_properties_using_php
https://ezpedia.org/solution/fetching_ezimage_datatype_image_alias_properties_using_php
<div class="object-center">
<p class="editor_motivation">
This is a <a href="/en/template/stub">Stub</a> article. Help the eZ Publish community by expanding it!
</p>
</div><a name="eztoc226750_1" id="eztoc226750_1"></a><h2>Introduction</h2>
<p>
Did you know that you can use the eZ Publish kernel api to obtain image alias properties from content object attributes which use the ezimage datatype.
</p>
<a name="eztoc226750_2" id="eztoc226750_2"></a><h2>Example</h2>
<p>
This is a simple php example of how you may use the eZ Publish kernel api to obtain image alias properties. This example comes from a simple example custom module view.
</p>
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;"><?php</span>
<span style="color: #009933; font-style: italic;">/**
* File image.php
*
* @package image.php
* @version //autogentag//
* @copyright Copyright (C) 2007 Brookins Consulting. All rights reserved.
* @license https://www.gnu.org/licenses/gpl.txt GPL License
*/</span>
<span style="color: #000088;">$Module</span> <span style="color: #339933;">=&</span> <span style="color: #000088;">$Params</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'Module'</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// START</span>
<span style="color: #666666; font-style: italic;">// Assume this type of module/view url:</span>
<span style="color: #666666; font-style: italic;">// www.site.com/myextension/mymodule/myview/1234</span>
<span style="color: #666666; font-style: italic;">// 1234 maps to the view parameter, MyNode (eg: $Params["MyNode"])</span>
<span style="color: #666666; font-style: italic;">// 0. Include the necessary files -- I would imagine that some are include</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'lib/ezdb/classes/ezdb.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'lib/ezutils/classes/ezfunctionhandler.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'lib/ezutils/classes/ezoperationhandler.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'lib/ezutils/classes/ezhttptool.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/common/template.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/ezcontentclass.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/ezpreferences.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/datatypes/ezimage/ezimage.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/datatypes/ezurl/ezurl.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/datatypes/ezurl/ezurlobjectlink.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 1. Create an instance of the database</span>
<span style="color: #000088;">$db</span> <span style="color: #339933;">=&</span> eZDB<span style="color: #339933;">::</span><span style="color: #004000;">instance</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 2. Query the node via node id</span>
<span style="color: #000088;">$my_node</span> <span style="color: #339933;">=&</span> eZContentObject<span style="color: #339933;">::</span><span style="color: #004000;">fetchByNodeID</span><span style="color: #009900;">(</span> <span style="color: #000088;">$Params</span><span style="color: #009900;">[</span><span style="color: #0000ff;">"MyNode"</span><span style="color: #009900;">]</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// $my_node =& eZContentObject::fetchByNodeID( '86' );</span>
<span style="color: #666666; font-style: italic;">// 3. Get a copy of the data_map</span>
<span style="color: #000088;">$my_node_data_map</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$my_node</span><span style="color: #339933;">-></span><span style="color: #004000;">fetchDataMap</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 4. Get a reference to the image</span>
<span style="color: #000088;">$my_node_image</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$my_node_data_map</span><span style="color: #009900;">[</span><span style="color: #0000ff;">"image"</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// $my_node_image_data = $my_node_image->DataText;</span>
<span style="color: #666666; font-style: italic;">// Example Usage of the eZ Image Alias Handler Class / System</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/datatypes/ezimage/ezimagealiashandler.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 5. Fetch Alias Handler</span>
<span style="color: #000088;">$image_alias_handler</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> eZImageAliasHandler<span style="color: #009900;">(</span> <span style="color: #000088;">$my_node_image</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 6. Fetch Alias Attributes*</span>
<span style="color: #666666; font-style: italic;">// 7. Fetch Original Image Path as URI</span>
<span style="color: #000088;">$my_node_image_uri</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">"/"</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$image_alias_handler</span><span style="color: #339933;">-></span><span style="color: #004000;">attributeFromOriginal</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'url'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 8. Fetch Original Image Dimentions</span>
<span style="color: #000088;">$my_node_image_width</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image_alias_handler</span><span style="color: #339933;">-></span><span style="color: #004000;">attributeFromOriginal</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'width'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_node_image_height</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image_alias_handler</span><span style="color: #339933;">-></span><span style="color: #004000;">attributeFromOriginal</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'height'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 9. Get the associated link</span>
<span style="color: #000088;">$my_node_link_object</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$my_node_data_map</span><span style="color: #009900;">[</span><span style="color: #0000ff;">"my_link"</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_node_link_url_object</span> <span style="color: #339933;">=</span> eZURL<span style="color: #339933;">::</span><span style="color: #004000;">fetch</span><span style="color: #009900;">(</span> <span style="color: #000088;">$my_node_link_object</span><span style="color: #339933;">-></span><span style="color: #004000;">DataInt</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_node_link_url</span><span style="color: #339933;">=</span><a href="https://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a> <span style="color: #009900;">(</span> <span style="color: #0000ff;">"/"</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">"+"</span><span style="color: #339933;">,</span> <span style="color: #000088;">$my_node_link_url_object</span><span style="color: #339933;">-></span><span style="color: #004000;">attribute</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'url'</span> <span style="color: #009900;">)</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 10. Instantiate the template and set the template vars</span>
<span style="color: #000088;">$tpl</span> <span style="color: #339933;">=&</span> templateInit<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$tpl</span><span style="color: #339933;">-></span><span style="color: #004000;">setVariable</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'parameters'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$Params</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$tpl</span><span style="color: #339933;">-></span><span style="color: #004000;">setVariable</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'my_node_image_path'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$my_node_image_uri</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$tpl</span><span style="color: #339933;">-></span><span style="color: #004000;">setVariable</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'my_node_image_width'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$my_node_image_width</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$tpl</span><span style="color: #339933;">-></span><span style="color: #004000;">setVariable</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'my_node_image_height'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$my_node_image_height</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$tpl</span><span style="color: #339933;">-></span><span style="color: #004000;">setVariable</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'my_node_link_url'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$my_node_link_url</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// END</span>
<span style="color: #666666; font-style: italic;">// phpinfo();</span>
eZExecution<span style="color: #339933;">::</span><span style="color: #004000;">cleanExit</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?></span></pre><a name="eztoc226750_3" id="eztoc226750_3"></a><h2>References</h2>
<ul>
<li><a href="/en/ez/image_alias_handler" target="_self">ezimagealiashandler</a></li>
</ul>
Mon, 17 Dec 2007 10:05:11 GMTOverriding kernel error templates
https://ezpedia.org/solution/overriding_kernel_error_templates
https://ezpedia.org/solution/overriding_kernel_error_templates<a name="eztoc222558_1" id="eztoc222558_1"></a><h2>Match conditions</h2>
<p>
Templates used/called by the kernel/error view do indeed have a couple design keys that could be used for override via override.ini(.append.php). Besides the obvious Source filter, it is also possible to use:
</p>
<ul>
<li><i>error_type</i>: this is always kernel for the standard modules,</li>
<li><i>error_number</i>: 1 for access denied, etc.</li>
</ul>
<p>
For all intents and purposes, however, this is not a viable method of displaying custom error templates because it is not possible to match on a given view.
</p>
<a name="eztoc222558_2" id="eztoc222558_2"></a><h2>Template variables</h2>
<p>
<i>kernel/error/view.php</i> passes very (very) little useful information to the various error_code templates, so there is nothing natively available in these templates to<br />use for doing things like for example a switch/case on section.
</p>
<p>
The best solution at the time of writing is to use <i>$redirect_uri</i>, from which it is possible to extract the module, current node ID, etc.
</p>
<a name="eztoc222558_3" id="eztoc222558_3"></a><h2>Author</h2>
<p>
Based on a summary by Andrew Kelly in <a href="https://ez.no/developer/forum/developer/trouble_overriding_access_denied_template" target="_self">Trouble overriding "Access Denied" template (eZ forums)</a>
</p>
<a name="eztoc222558_4" id="eztoc222558_4"></a><h2>Reference</h2>
<ul>
<li><a href="/en/ez/kernel_error_codes" target="_self">Kernel error codes</a></li>
<li>Doc: <a href="https://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/error" target="_blank">Error Module Reference</a></li>
</ul>
Sun, 25 Nov 2007 09:11:01 GMTDisable Dirty Object Draft Edit Show Versions View
https://ezpedia.org/solution/disable_dirty_object_draft_edit_show_versions_view
https://ezpedia.org/solution/disable_dirty_object_draft_edit_show_versions_view
<div class="object-right">
<p class="editor_motivation">
This is a <a href="/en/template/stub">Stub</a> article. Help the eZ Publish community by expanding it!
</p>
</div><a name="eztoc220039_1" id="eztoc220039_1"></a><h2>Need</h2>
<p>
To ensure that users who are editing their own content objects on the frontend are not bothered by encountering the "existing drafts" window / page.
</p>
<a name="eztoc220039_2" id="eztoc220039_2"></a><h2>Solution</h2>
<p>
One solution may be to use the following setting to provide for the above need.
</p>
<a name="eztoc220039_2_1" id="eztoc220039_2_1"></a><h3>Setting</h3>
<p>
Default setting from the setings file, settings/site.ini
</p>
<pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">[</span>ContentSettings<span style="">]</span></span>
# What to do when editing an object that has draft versions newer than the current version.
# Use 'showversions' to select which version to edit, or 'usecurrent' to always edit the current version.
<span style="color: #000099;">EditDirtyObjectAction</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #000066; font-weight:bold;"><span style="color: #660066;">showversions|usecurrent</span></span></pre>
<p>
Solution setting for your setings override file, settings/override/site.ini.append.php
</p>
<pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">[</span>ContentSettings<span style="">]</span></span>
<span style="color: #000099;">EditDirtyObjectAction</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">usecurrent</span></pre><a name="eztoc220039_3" id="eztoc220039_3"></a><h2>References</h2>
<ul>
<li>Doc: <a href="https://ez.no/doc/ez_publish/technical_manual/3_10/reference/configuration_files/site_ini/contentsettings/editdirtyobjectaction" target="_self">Reference - EditDirtyObjectAction</a> </li>
</ul>
Wed, 14 Nov 2007 14:16:48 GMTImport existing content object url aliases into eZ using the eZUrlAlias API
https://ezpedia.org/solution/import_existing_content_object_url_aliases_into_ez_using_the_ezurlalias_api
https://ezpedia.org/solution/import_existing_content_object_url_aliases_into_ez_using_the_ezurlalias_api<a name="eztoc216111_1" id="eztoc216111_1"></a><h2>Question</h2>
<p>
How to create though data import (content migration) a complex maping of internal url aliases into eZ Publish for compatibility internal with existing urls
</p>
<a name="eztoc216111_2" id="eztoc216111_2"></a><h2>Reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/developer/forum/developer/solved_migration_to_ezp_url_migration_problem#msg152133" title="Posted by: Andrey Astakhov: Solution: <code> $systemUrlAlias = ezUrlAlias::fetchBySourceURL( " target="_self">Migration to eZ Publish : A url migration solution</a> </li>
</ul>
Fri, 26 Oct 2007 18:54:50 GMTHow to change the datatype of attributes?
https://ezpedia.org/solution/how_to_change_the_datatype_of_attributes
https://ezpedia.org/solution/how_to_change_the_datatype_of_attributes
<p>
There's no feature currently included with eZ Publish to change an attribute's datatype. However, there are some methods for it already.
</p>
<a name="eztoc212995_1" id="eztoc212995_1"></a><h2>Internally compatible datatypes</h2>
<p>
If a datatype is internally compatible, which means it stores both its class level and object level data in the same way in the database fields of ezcontentobject_attribute and ezcontentclass_attribute, then you can use some simple SQL to change the datatypes. The following example SQL will change all attributes of the datatype with identifier "places" to the datatype with identifier "ezinteger":
</p>
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> ezcontentclass_attribute <span style="color: #993333; font-weight: bold;">SET</span> data_type_string<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ezinteger'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> data_type_string<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'places'</span>;
<span style="color: #66cc66;">[</span><span style="color: #993333; font-weight: bold;">UPDATE</span> ezcontentobject_attribute <span style="color: #993333; font-weight: bold;">SET</span> data_type_string<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ezinteger'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> data_type_string<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'places'</span>;
</pre><a name="eztoc212995_2" id="eztoc212995_2"></a><h2>Non-internally compatible datatypes</h2>
<p>
There is an experimental extension available at <a href="https://ez.no/developer/contribs/datatypes/datatypes" target="_self">https://ez.no/developer/contribs/datatypes/datatypes</a>. You can write plug-ins for it to handle conversion of specific datatypes.
</p>
<a name="eztoc212995_3" id="eztoc212995_3"></a><h2>References</h2>
<ul>
<li>Forum: <a href="https://ez.no/developer/forum/developer/change_object_content_class" target="_blank">Change Object Content Class</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/extensions/converting_ezstring_to_ezxml_with_ezchangeclass_extension" target="_blank">Converting ezstring to ezxml with ezchangeclass extension</a></li>
<li>Forum: <a href="https://ez.no/developer/forum/setup_design/changing_an_attribute_datatype" target="_blank">Changing an attribute datatype</a> (Outdated information)</li>
<li>Contribution: <a href="https://ez.no/community/contribs/applications/object_content_class_change" target="_blank">Object content class change</a></li>
</ul>
Mon, 08 Oct 2007 05:15:40 GMTChecking out all projects.ez.no subversion repositories
https://ezpedia.org/solution/checking_out_all_projects_ez_no_subversion_repositories
https://ezpedia.org/solution/checking_out_all_projects_ez_no_subversion_repositories<a name="eztoc210631_1" id="eztoc210631_1"></a><h2>Problem</h2>
<p>
There is a lot of individual projects svn repositories! <br />
How to get your head around so many projects.<br />This is how you can check them all out quickly ...
</p>
<a name="eztoc210631_2" id="eztoc210631_2"></a><h2>Resources</h2>
<ul>
<li>Project Repositories: List of svn repository url locations within in csv file, <a href="https://projects.ez.no/repositories.csv" target="_self">repositories.csv</a>
<ul>
<li>Warning: <i>"...there are DOS EOL markers XD in that .csv file XD"</i> </li>
</ul>
</li>
</ul>
<a name="eztoc210631_3" id="eztoc210631_3"></a><h2>Solutions</h2><a name="eztoc210631_3_1" id="eztoc210631_3_1"></a><h3>Checking out with shell commands</h3> <pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-q</span> <span style="color: #660033;">-O</span> - <span style="color: #ff0000;">'https://projects.ez.no/repositories.csv'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">'\015'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-i</span> <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #7a0874; font-weight: bold;">{</span><span style="color: #7a0874; font-weight: bold;">}</span></pre><a name="eztoc210631_3_2" id="eztoc210631_3_2"></a><h3>Checking out with php commands</h3> <pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;"><</span>?php
<span style="color: #007800;">$handle</span> = fopen<span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #ff0000;">"https://projects.ez.no/repositories.csv"</span>, <span style="color: #ff0000;">"r"</span> <span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #007800;">$row</span> = <span style="color: #000000;">1</span>;
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #007800;">$data</span> = fgetcsv<span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #007800;">$handle</span>, <span style="color: #000000;">1000</span>, <span style="color: #ff0000;">","</span> <span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #000000; font-weight: bold;">!</span>== FALSE<span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #7a0874; font-weight: bold;">{</span>
<span style="color: #007800;">$num</span> = count<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #007800;">$data</span><span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #000000; font-weight: bold;">//</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"** <p> <span style="color: #007800;">$num</span> fields in line <span style="color: #007800;">$row</span>: <br /></p><span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #007800;">$row</span>++;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #007800;">$c</span>=<span style="color: #000000;">0</span>; <span style="color: #007800;">$c</span> <span style="color: #000000; font-weight: bold;"><</span> <span style="color: #007800;">$num</span>; <span style="color: #007800;">$c</span>++<span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #7a0874; font-weight: bold;">{</span>
<span style="color: #007800;">$line</span> = <span style="color: #007800;">$data</span><span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #007800;">$c</span><span style="color: #7a0874; font-weight: bold;">]</span>;
<span style="color: #007800;">$repo</span> = escapeshellcmd<span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #007800;">$line</span> <span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #007800;">$name</span> = <span style="color: #c20cb9; font-weight: bold;">split</span><span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #ff0000;">"/"</span>, <span style="color: #007800;">$repo</span> <span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #007800;">$name</span> = <span style="color: #007800;">$name</span><span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">]</span>;
<span style="color: #000000; font-weight: bold;">//</span> print_r<span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #007800;">$name</span> <span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #000000; font-weight: bold;">//</span> Example: http:<span style="color: #000000; font-weight: bold;">//</span>svn.projects.ez.no<span style="color: #000000; font-weight: bold;">/</span>bcwebsitestatistics
<span style="color: #007800;">$last_line</span> = system<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #ff0000;">"svn co <span style="color: #007800;">$repo</span>"</span>, <span style="color: #007800;">$retval</span> <span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"Repository Name: "</span>. <span style="color: #007800;">$name</span> . <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"Repository URL: "</span>. <span style="color: #007800;">$repo</span> . <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"Checkout Last Line: "</span>. <span style="color: #007800;">$last_line</span> . <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #000000; font-weight: bold;">if</span><span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #007800;">$retval</span> == <span style="color: #ff0000;">"0"</span> <span style="color: #7a0874; font-weight: bold;">)</span>
<span style="color: #7a0874; font-weight: bold;">{</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"Checkout: "</span>. <span style="color: #ff0000;">"Success"</span> . <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #7a0874; font-weight: bold;">}</span>
<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #7a0874; font-weight: bold;">{</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"Checkout: "</span>. <span style="color: #ff0000;">"Failure"</span> . <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #7a0874; font-weight: bold;">}</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #000000; font-weight: bold;">//</span> DEBUG: Print additional information
<span style="color: #000000; font-weight: bold;">/*</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'
</pre>
<hr />Last line of the output: '</span> . <span style="color: #007800;">$last_line</span> . <span style="color: #ff0000;">'
<hr />Return value: '</span> . <span style="color: #007800;">$retval</span> . <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">}</span>
<span style="color: #7a0874; font-weight: bold;">}</span>
fclose<span style="color: #7a0874; font-weight: bold;">(</span> <span style="color: #007800;">$handle</span> <span style="color: #7a0874; font-weight: bold;">)</span>;
?<span style="color: #000000; font-weight: bold;">></span></pre>Mon, 24 Sep 2007 08:45:13 GMTDealing with content object corruption
https://ezpedia.org/solution/dealing_with_content_object_corruption
https://ezpedia.org/solution/dealing_with_content_object_corruption<a name="eztoc206657_1" id="eztoc206657_1"></a><h2>About</h2>
<p>
Dealing with content object corruption or what to do with a corrupt eZ Publish Database?
</p>
<a name="eztoc206657_2" id="eztoc206657_2"></a><h2>External References</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/general/problem_corrupt_contentobjects#msg147670" title="Posted by: Jonny Bergkvist: Hi, I have a problem on all eZ databases I have where users have published content for a while. Objects exists where current_version of the object doesn" target="_self">Problem: corrupt contentobjects</a> </li>
</ul>
Sat, 25 Aug 2007 20:10:36 GMTHow to do an attribute filter using the like condition
https://ezpedia.org/solution/how_to_do_an_attribute_filter_using_the_like_condition
https://ezpedia.org/solution/how_to_do_an_attribute_filter_using_the_like_condition
<p>
We have seen this question asked many times and wanted to ensure this question is simpler to answer in the future
</p>
<a name="eztoc205146_1" id="eztoc205146_1"></a><h2>Question</h2>
<p>
How <i>exactly</i> do you use an attribute filter using the like condition?
</p>
<a name="eztoc205146_2" id="eztoc205146_2"></a><h2>Solutions</h2>
<p>
These solutions have been tested but may not be generic, so some modifications to ids etc may be required.
</p>
<a name="eztoc205146_2_1" id="eztoc205146_2_1"></a><h3>Filter by Class/Attribute Identifier</h3> <pre class="eztemplate" style="font-family:monospace;"><span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$c</span><span style="color: #66cc66;">=</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=fetch&SearchContentClassID=31"><span style="color: #0600FF;">fetch</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'content'</span>, <span style="color: #dd0000;">'tree'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=hash&SearchContentClassID=31"><span style="color: #0600FF;">hash</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'parent_node_id'</span>, <span style="color: #cc66cc;">175</span>,
depth, <span style="color: #cc66cc;">7</span>,
attribute_filter, <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span> <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'article/keywords'</span>, <span style="color: #dd0000;">'like'</span>, <span style="color: #dd0000;">'*string*'</span> <span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span>
<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><span style="color: #0000bb;">$c</span><span style="color: #66cc66;">|</span>attribute<span style="color: #66cc66;">(</span>show,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><span style="color: #0000bb;">$c</span>.0<span style="color: #66cc66;">|</span>attribute<span style="color: #66cc66;">(</span>show,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
</pre><a name="eztoc205146_2_2" id="eztoc205146_2_2"></a><h3>Filter by Attribute ID</h3> <pre class="eztemplate" style="font-family:monospace;"><span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$c</span><span style="color: #66cc66;">=</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=fetch&SearchContentClassID=31"><span style="color: #0600FF;">fetch</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'content'</span>, <span style="color: #dd0000;">'tree'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=hash&SearchContentClassID=31"><span style="color: #0600FF;">hash</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'parent_node_id'</span>, <span style="color: #cc66cc;">175</span>,
depth, <span style="color: #cc66cc;">7</span>,
attribute_filter, <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span> <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span> <span style="color: #cc66cc;">865</span>, <span style="color: #dd0000;">'like'</span>, <span style="color: #dd0000;">'*string*'</span> <span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span>
<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
</pre><a name="eztoc205146_2_3" id="eztoc205146_2_3"></a><h3>Filter by dynamic string variable</h3> <pre class="eztemplate" style="font-family:monospace;"><span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$tag</span><span style="color: #66cc66;">=</span><span style="color: #dd0000;">'string'</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$c</span><span style="color: #66cc66;">=</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=fetch&SearchContentClassID=31"><span style="color: #0600FF;">fetch</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'content'</span>, <span style="color: #dd0000;">'tree'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=hash&SearchContentClassID=31"><span style="color: #0600FF;">hash</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'parent_node_id'</span>, <span style="color: #cc66cc;">175</span>,
depth, <span style="color: #cc66cc;">7</span>,
attribute_filter, <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span> <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'article/keywords'</span>, <span style="color: #dd0000;">'like'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=concat&SearchContentClassID=31"><span style="color: #0600FF;">concat</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'*'</span>, <span style="color: #0000bb;">$tag</span>, <span style="color: #dd0000;">'*'</span> <span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span>
<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
</pre><a name="eztoc205146_2_4" id="eztoc205146_2_4"></a><h3>Warning</h3>
<p>
Be certain to clear <a href="/en/ez/cache" target="_self">cache</a> or <a href="/en/solution/template_development_without_clearing_cache" target="_self">disable cache</a>!
</p>
<a name="eztoc205146_3" id="eztoc205146_3"></a><h2>References</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/developer/attribute_filter_breaking_fetch#msg144793" target="_self">How to use an attribute filter like condition?</a> </li>
<li>Doc: <a href="https://ez.no/doc/ez_publish/technical_manual/3_9/reference/modules/content/fetch_functions/list#eztoc64252_0_0_1" target="_self">Reference, fetch functions, list</a> </li>
</ul>
Mon, 13 Aug 2007 08:43:28 GMTTemplate Development Without Clearing Cache
https://ezpedia.org/solution/template_development_without_clearing_cache
https://ezpedia.org/solution/template_development_without_clearing_cache
<p>
You can do template development without having to constantly clear cache! This page is perhaps one of the most important to the largest number of users in the community.
</p>
<a name="eztoc205142_1" id="eztoc205142_1"></a><h2>Global Example</h2>
<p>
Simply add these settings to the following file and clear cache (one last time)
</p>
<p>
The following example works great with both eZ Publish 3.9 and even better (solution for the best template debug information) with 4.0.
</p>
<p>
Example File: <i>setting/override/site.ini.append.php</i>
</p>
<pre class="eztemplate" style="font-family:monospace;">[ContentSettings]
ViewCaching=disabled
[TemplateSettings]
TemplateCache=disabled
TemplateCompile=disabled
DevelopmentMode=enabled
CacheThreshold=0
ShowUsedTemplates=enabled
# TemplateOptimization=enabled
# Debug=enabled</pre><a name="eztoc205142_2" id="eztoc205142_2"></a><h2>References</h2>
<ul>
<li>None</li>
</ul>
Mon, 13 Aug 2007 08:17:49 GMTReasons to become an eZ Partner
https://ezpedia.org/solution/reasons_to_become_an_ez_partner
https://ezpedia.org/solution/reasons_to_become_an_ez_partner
<p>
There are many reasons why regular users of eZ Publish should join eZ systems as eZ Partners
</p>
<a name="eztoc204963_1" id="eztoc204963_1"></a><h2>Reasons</h2>
<ul>
<li><i>Communication</i>; Increased communication between eZ Systems and you</li>
<li><i>Ecosystem</i>; Become an integral part of the worldwide ecosystem dedicated to the advancement of eZ</li>
<li><i>Discounts</i>; Discounts for all eZ Systems Products and Services; Including eZ Systems Support</li>
<li><i>Advertising</i>; Have your business advertised on ez.no in the worldwide partner directory</li>
<li><i>Points</i>; Earn points which raise your level in the ecosystem, partner directory and partner level</li>
</ul>
<a name="eztoc204963_2" id="eztoc204963_2"></a><h2>Consider the following</h2>
<ul>
<li><i>An Investment</i>; If your going to be using eZ Publish in 6 Months from now wouldn't you prefer to earn benefits during this time?</li>
<li><i>Potential Savings</i>; If, in the future you wish to purchase support, consulting, services or products from eZ Systems; as a partner you are entitled to valuable discounts.</li>
<li>Growth; While you use eZ publish it helps greatly to network with those who have a wealth of experiance in eZ. Becomming a partner opens up oportunities for growth</li>
</ul>
<a name="eztoc204963_3" id="eztoc204963_3"></a><h2>External References</h2>
<ul>
<li><a href="https://ez.no/partner/ez_partner_program" target="_self">eZ Partner Program</a></li>
<li><a href="https://ez.no/partner/ez_partner_program/partner_program_pdf" target="_self">eZ Partner program PDF</a></li>
<li><a href="https://www.phpdeveloper.org/news/6209" target="_self">PHPDeveloper.org: Zak Greant's Blog: <b>The eZ partner program</b> <b>...</b> </a></li>
</ul>
Sun, 12 Aug 2007 09:58:05 GMTRetrieving all packages eZ Publish 3.8
https://ezpedia.org/solution/retrieving_all_packages_ez_publish_3_8
https://ezpedia.org/solution/retrieving_all_packages_ez_publish_3_8<a name="eztoc204738_1" id="eztoc204738_1"></a><h2>External references</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/install_configuration/how_do_i_retrieve_all_packages_for_my_3_8_install" target="_self">How to retrieve all packages for eZ Publish 3.8 Installation</a> </li>
</ul>
Sat, 11 Aug 2007 04:14:56 GMTMicrosoft Vista and Webdav
https://ezpedia.org/solution/microsoft_vista_and_webdav
https://ezpedia.org/solution/microsoft_vista_and_webdav<a name="eztoc204018_1" id="eztoc204018_1"></a><h2>Problem</h2>
<p>
I just setup a webdav site. It didn't work. Then I found out that none of my ez webdav sites are working - shocking!
</p>
<a name="eztoc204018_1_1" id="eztoc204018_1_1"></a><h3>Cause</h3>
<p>
Well, the reason is: You can't open a webdav site with CTRL+O like it was before at Windows XP and Explorer.
</p>
<a name="eztoc204018_2" id="eztoc204018_2"></a><h2>Solution</h2>
<ol>
<li>You need to open, Start -> Computer -> Extras -> add network resource</li>
<li>Choose "web folder" (or is there "webdav" in english?)</li>
<li>Enter the url WITHOUT # at the end! Like, https://webdav.mysite.com/</li>
<li>Save it - works again.</li>
</ol>
<a name="eztoc204018_3" id="eztoc204018_3"></a><h2>Reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/install_configuration/webdav_and_vista#msg142994" title="Posted by: Georg Franz: Hi, I just setup a webdav site. It didn" target="_self">webdav and vista</a> </li>
</ul>
Sun, 05 Aug 2007 20:38:44 GMTDealing with templates with static strings or ids
https://ezpedia.org/solution/dealing_with_templates_with_static_strings_or_ids
https://ezpedia.org/solution/dealing_with_templates_with_static_strings_or_ids<a name="eztoc201480_1" id="eztoc201480_1"></a><h2>Description</h2>
<p>
You should not leave static strings or ids within a customized template where ever possible.
</p>
<p>
Instead you should move these into a settings file and make reference to the custom settings variables you define.
</p>
<a name="eztoc201480_2" id="eztoc201480_2"></a><h2>Example</h2>
<p>
This example should show clearly a basic example of how to store your custom variable contents within a settings file and access them in a template.
</p>
<a name="eztoc201480_2_1" id="eztoc201480_2_1"></a><h3>Setting</h3>
<p>
File: s <i>ettings/override/example_com.ini.append.php</i>
</p>
<pre class="ini" style="font-family:monospace;"><?php /* #?ini charset<span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">"utf-8"</span>?
<span style="color: #000066; font-weight:bold;"><span style="">[</span>CustomNodeIDs<span style="">]</span></span>
<span style="color: #000099;">NodeName001</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">42</span>
<span style="color: #000099;">NodeName002</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">84</span>
<span style="color: #000099;">NodeName003</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">11</span>
*/ ?></pre><a name="eztoc201480_2_2" id="eztoc201480_2_2"></a><h3>Template</h3>
<p>
File: <i>design/standard/templates/pagelayout.tpl</i>
</p>
<pre class="php" style="font-family:monospace;"><span style="color: #009900;">{</span>def <span style="color: #000088;">$node_name_001</span> <span style="color: #339933;">=</span> ezini<span style="color: #009900;">(</span> <span style="color: #0000ff;">'CustomNodeIDs'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'NodeName001'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'example_com.ini'</span> <span style="color: #009900;">)</span><span style="color: #009900;">}</span>
<span style="color: #009900;">{</span><span style="color: #b1b100;">if</span> is_set<span style="color: #009900;">(</span> <span style="color: #000088;">$node_name_001</span> <span style="color: #009900;">)</span><span style="color: #009900;">}</span>
<span style="color: #009900;">[</span><span style="color: #339933;">...</span>display something<span style="color: #339933;">...</span><span style="color: #009900;">]</span>
<span style="color: #009900;">{</span><span style="color: #b1b100;">else</span><span style="color: #009900;">}</span>
<span style="color: #009900;">[</span><span style="color: #339933;">...</span>display something <span style="color: #b1b100;">else</span><span style="color: #339933;">...</span><span style="color: #009900;">]</span>
<span style="color: #009900;">{</span><span style="color: #339933;">/</span><span style="color: #b1b100;">if</span><span style="color: #009900;">}</span></pre><a name="eztoc201480_2_3" id="eztoc201480_2_3"></a><h3>Reference</h3>
<ul>
<li><a href="https://ez.no/doc/ez_publish/technical_manual/3_9/reference/template_operators/data_and_information_extraction/ezini" target="_self">Template Operator: ezini</a></li>
</ul>
Tue, 03 Jul 2007 04:29:22 GMTWebsite toolbar for custom classes
https://ezpedia.org/solution/website_toolbar_for_custom_classes
https://ezpedia.org/solution/website_toolbar_for_custom_classes
<p>
By default, the website toolbar in 3.9 is only shown for classes shipped with the website interface. If you want it to be shown for a custom class, add your class' name to the AvailableForClasses[] array in extension/ezwebin/settings/websitetoolbar.ini and clear the cache ;)
</p>
<p>
If your class is a container, you also need to add it to the ContentClassContainers array in the same file to enable creating objects under it.
</p>
Sat, 19 May 2007 10:10:31 GMTEmbedding a poll content object within a page
https://ezpedia.org/solution/embedding_a_poll_content_object_within_a_page
https://ezpedia.org/solution/embedding_a_poll_content_object_within_a_page<a name="eztoc181781_1" id="eztoc181781_1"></a><h2>Brief</h2>
<p>
eZ publish offers the ability to embed content objects within a template.
</p>
<a name="eztoc181781_2" id="eztoc181781_2"></a><h2>Question</h2>
<p>
How to ... embedded Poll in page
</p>
<a name="eztoc181781_3" id="eztoc181781_3"></a><h2>Solution</h2>
<p>
See related forum thread.
</p>
<a name="eztoc181781_4" id="eztoc181781_4"></a><h2>External references</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/setup_design/poll_embedded_in_page" target="_self">Poll embedded in page</a> </li>
</ul>
Mon, 16 Apr 2007 12:40:12 GMTUsing eZ publish doxygen api documentation
https://ezpedia.org/solution/using_ez_publish_doxygen_api_documentation
https://ezpedia.org/solution/using_ez_publish_doxygen_api_documentation<a name="eztoc173782_1" id="eztoc173782_1"></a><h2>About</h2>
<p>
eZ Publish PHP source code contains inline documentation. The inline documentation uses the <a href="/en/ez/doxygen" target="_self">doxygen</a> format. This inline documentation can be processed and used to build html documentation based on the contents of the eZ Publish PHP source code.
</p>
<a name="eztoc173782_2" id="eztoc173782_2"></a><h2>Hosted Doxygen Documentation</h2>
<p>
<a href="/en/project/pubsvn" target="_self">PubSVN</a> hosts a regularly updated copy of this generated html <a href="/en/ez/doxygen" target="_self">doxygen</a> documentation which is built from the eZ Publish Trunk Subversion Repository. This documentation offers a unique perspective in looking and <a href="/en/ez/opensearch" target="_self">searching</a> quickly for information about the eZ Publish PHP source code and available APIs.
</p>
<p>
<a href="https://pubsvn.ez.no/doxygen/" target="_self">https://pubsvn.ez.no/doxygen/</a>
</p>
<a name="eztoc173782_3" id="eztoc173782_3"></a><h2>External reference</h2>
<ul>
<li>Project: <a href="https://www.stack.nl/%7Edimitri/doxygen/index.html" target="_self">Doxygen</a> </li>
<li>Doxygen <a href="https://www.stack.nl/%7Edimitri/doxygen/manual.html" target="_self">Manual</a> </li>
<li>Download <a href="https://www.stack.nl/%7Edimitri/doxygen/download.html#latestsrc" target="_self">Doxygen Software</a> </li>
<li>Download <a href="https://ez.no/download" target="_self">eZ publish</a> </li>
</ul>
Mon, 09 Apr 2007 04:49:59 GMTx86-64 etc, php, ez documentation
https://ezpedia.org/solution/x86_64_etc_php_ez_documentation
https://ezpedia.org/solution/x86_64_etc_php_ez_documentation<a name="eztoc168144_1" id="eztoc168144_1"></a><h2>Nesting : A potential issue</h2><a name="eztoc168144_1_1" id="eztoc168144_1_1"></a><h3>Error</h3>
<p>
<b>Fatal error</b>: Maximum function nesting level of '64' reached, aborting! in <b>/var/www/vhosts/ez/lib/eztemplate/classes/eztemplatecompiler.php</b> on line <b>1330</b> <br />
<b>Fatal error</b>: Maximum function nesting level of '64' reached, aborting! in <b>Unknown</b> on line <b>0</b> <br />
<b>Fatal error</b>: Maximum function nesting level of '64' reached, aborting! in <b>Unknown</b> on line <b>0</b> <br /><b>Fatal error</b>: Maximum function nesting level of '64' reached, aborting! in <b>Unknown</b> on line <b>0</b>
</p>
<a name="eztoc168144_1_2" id="eztoc168144_1_2"></a><h3>Addressed</h3>
<p>
As a 64 bit error, https://issues.ez.no/3609
</p>
<p>
Forum: https://ez.no/community/forum/install_configuration/install_problem_with_3_4_php_error_due_to_function_nesting
</p>
<a name="eztoc168144_2" id="eztoc168144_2"></a><h2><b>Solution:</b></h2>
<p>
It's a good idea to disable or remove xdebug from your production server until you are certain you must enable it to solve a specific problem.
</p>
<p>
xdebug.max_nesting_level = 100
</p>
Tue, 03 Apr 2007 20:06:52 GMTRounded Corners on Images
https://ezpedia.org/solution/rounded_corners_on_images
https://ezpedia.org/solution/rounded_corners_on_images
<p>
Abstract: Image processing is a very powerful feature of eZpublish. This article shows you how to combine 24 bit PNG images with ImageMagick via the eZpublish image alias system, and to produce images with pre-rendered rounded corners.
</p>
<p>
**************************************************************<br />
There are a number of ways of approaching this problem. <br />
It is possible to overlay a mask (a second image with a transparent centre) in an overlaid div, but this solution has one big drawback: Internet Explorer has patchy support for the only image format which has full alpha support, png24. Which means you are stuck with using a gif, and with jagged edges.<br />
A much better way is to get ImageMagick, one of the graphics processors included with EzPublish, to do the work. It is theoretically possible to get ImageMagick to measure the picture and draw the mask, but this is complicated (if anyone gets it to work please let us know). These discussions may be a good starting place if you feel like taking this to the next level:<br />
<a href="https://www.imagemagick.org/Usage/thumbnails/#rounded_border" title="https://www.imagemagick.org/Usage/thumbnails/#rounded_border" target="_self">https://www.imagemagick.org/Usage/thumbnails/#rounded_border</a><br />
This section of the ImageMagick useage manual gives details on this, but there are hurdles which would need to be overcome, such as getting ImageMagick in EzPublish to read external vector files (.mvg)<br />
and some more discussion here.<br />
<a href="https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=8401" title="https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=8401" target="_self">https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=8401</a><br />
For my particular use case we needed the resulting images to conform to an exact size, so rather than tackling the really hard stuff I elected to get ImageMagick to pull a png24 matt image from the design directory and overlay it on the source image. This is a simpler version of the technique described here:<br />
<a href="https://www-128.ibm.com/developerworks/library/l-graf2/?ca=dgr-lnxw15GraphicsLine" title="https://www-128.ibm.com/developerworks/library/l-graf2/?ca=dgr-lnxw15GraphicsLine" target="_self">https://www-128.ibm.com/developerw...y/l-graf2/?ca=dgr-lnxw15GraphicsLine</a><br />
but as the final image size is pre-determined there is no need to add the corners individually.<br />
The first thing you'll need to do is to establish whether the version of ImageMagick supports the -composite command. In the case of our host, Atvert Systems, we discovered that they were running the default version which shipped with the operating system - 6.0.7.1-16. (and this situation is quite likely for a professional hosting environment where system stability is more of a priority than having the latest versions of all components)<br />
Luckily Karl, who runs Atvert, was very helpful in identifying the problem and he quickly upgraded ImageMagick to version 6.3.2.7-1, which supports the necessary commands.<br />
The next step is to make a test graphic, you can skip this if you are feeling really sure of yourself but I'd recommend it - you'll probably save yourself a few headaches. Make a two layer Photoshop (but make sure you convert the background layer to an normal one in PS's case) or Gimp file, put the word 'front' on one layer and the work 'back' on another, both with transparent backgrounds. Export the two layers as png24s with transparency. Put the 'front' one in your siteaccess images folder - that will eventually be your matt. <br />
You now need to find out the 'fully qualified path' to that folder. It won't be the ftp path. In our case in involved prepending /var/www/html/ to the address you see in an ftp client. It's probably best to contact your hosting provider on this, unless you feel like a lot of guessing.<br />
Next, open image.ini.append.php. you can do this in either the siteaccess copy or the override copy. Just don't do it in both ! :)<br />
The first thing to add is the filter definition, it goes in the [ImageMagick]<br />section:
</p>
<pre class="xml" style="font-family:monospace;">[ImageMagick]
Filters[]=rounded=-compose dst-over -composite -gravity NorthWest /var/www/html/ ... more path goes here ... /design/news_site/images/picmask.png</pre>
<p>
This makes a filter called 'rounded', makes the destination go over the source, references the overlay to the top left corner and calls the matt image<br />
The -gravity switch may not be necessary. <br />Next, make an alias for the image which will use the filter:
</p>
<pre class="xml" style="font-family:monospace;">[AliasSettings]
AliasList[]=mypicturewitharoundedborder</pre>
<p>
Finally, add the filters to the alias;
</p>
<pre class="xml" style="font-family:monospace;">[mypicturewitharoundedborder]
Filters[]=geometry/scalewidth=156 Filters[]=geometry/crop=156;90;0;0
Filters[]=rounded=</pre>
<p>
The final filter applies the mask.<br />
Save and upload the ini file, go to your EzPublish Online Editor, choose an image (the 'back' one you made earlier) choose the mypicturewitharoundedborder alias from the dropdown and publish. When you are happy that it's working delete the 'front' image and replace it with one that does something useful!<br />Thanks to Bruce Morrison from DesignIT for his invaluable help in wrangling ImageMagick's sometimes slightly-less-than-intuitive command line syntax.
</p>
Tue, 27 Mar 2007 23:38:57 GMTDisable language selection prompt
https://ezpedia.org/solution/disable_language_selection_prompt
https://ezpedia.org/solution/disable_language_selection_prompt
<p>
You can simply disable the language selection dialog by providing a default or custom setting.
</p>
<a name="eztoc157362_1" id="eztoc157362_1"></a><h2>External reference</h2>
<ul>
<li><a href="https://ez.no/community/forum/developer/skip_language_selection_while_creating_objects_from_frontend" target="_self">skip language selection whi...</a></li>
</ul>
Sun, 25 Mar 2007 07:32:16 GMTOnline Editor copy and paste privilige settings in Mozilla based browsers
https://ezpedia.org/solution/online_editor_copy_and_paste_privilige_settings_in_mozilla_based_browsers
https://ezpedia.org/solution/online_editor_copy_and_paste_privilige_settings_in_mozilla_based_browsers<a name="eztoc153021_1" id="eztoc153021_1"></a><h2>Introduction</h2>
<p>
Mozilla and Firefox displays an error using the Online Editor without additional browser profile settings.
</p>
<p>
This is a common occurance for most casual users. Many don't quite understand this behavior. We hope this article provides for a clear explanation.
</p>
<a name="eztoc153021_1_1" id="eztoc153021_1_1"></a><h3>Error</h3>
<p>
"Quote"
</p>
<a name="eztoc153021_1_2" id="eztoc153021_1_2"></a><h3>Reasoning</h3>
<p>
Client side scripts should be required to ask first for permissions. This is a good solution.
</p>
<a name="eztoc153021_2" id="eztoc153021_2"></a><h2>Solution</h2>
<p>
Add the settings ...
</p>
<a name="eztoc153021_3" id="eztoc153021_3"></a><h2>External reference</h2>
<ul>
<li>Issue: <a href="https://issues.ez.no/IssueView.php?Id=7131&activeItem=5" target="_self">7131</a></li>
<li>Forum: N/A</li>
</ul>
Thu, 22 Mar 2007 00:12:42 GMTInserting inline client script into content using a custom tag
https://ezpedia.org/solution/inserting_inline_client_script_into_content_using_a_custom_tag
https://ezpedia.org/solution/inserting_inline_client_script_into_content_using_a_custom_tag
<div class="object-center">
<p class="editor_motivation">
This is a <a href="/en/template/stub">Stub</a> article. Help the eZ Publish community by expanding it!
</p>
</div><a name="eztoc151204_1" id="eztoc151204_1"></a><h2>Summary</h2>
<ul>
<li>On: Monday 12 March 2007 6:58:37 pm</li>
<li>From: Diego Barcia</li>
</ul>
<a name="eztoc151204_2" id="eztoc151204_2"></a><h2>Instructions</h2>
<p>
For a site, I needed to insert JavaScript statements to be parsed and not displayed by the browser, on a page-by-page basis. So I configured a <script> custom tag of an inline type into the content.ini file of the admin and the public siteacceses:
</p>
<pre class="ini" style="font-family:monospace;">AvailableCustomTags<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>script
IsInline<span style="color: #000066; font-weight:bold;"><span style="">[</span>script<span style="">]</span></span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">true</span></pre>
<p>
Then, I created a template file in the \templates\content\datatype\view\ezxmltags\ directory (of the site's design), called script.tpl, with this code:
</p>
<pre class="ini" style="font-family:monospace;"><script type<span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">"text/javascript"</span> <span style="color: #000099;">language</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">"javascript"</span>><span style="">{</span>$content<span style="">}</span></script></pre>
<p>
This worked fine. There is no need to wrap the $content variable within {literal} operators; there won't be any trouble using JavaScript curly braces ('{', '}').<br />The custom tag *must* be of an inline type, or else a parse error will be triggered by the engine, because block tags are printed between <p> tags, so the result would be like:
</p>
<pre class="ini" style="font-family:monospace;"><p><span style="">{</span>JavaScript code<span style="">}</span></p>.</pre>Tue, 20 Mar 2007 05:56:06 GMTBuilding an automated eZ publish demo
https://ezpedia.org/solution/building_an_automated_ez_publish_demo
https://ezpedia.org/solution/building_an_automated_ez_publish_demo<a name="eztoc139883_0_1" id="eztoc139883_0_1"></a><h3>Tools</h3>
<ul>
<li>eZ publish</li>
<li>MySQL</li>
<li>Subversion</li>
<li>Cron</li>
</ul>
<a name="eztoc139883_1" id="eztoc139883_1"></a><h2>Setup</h2>
<ul>
<li>Install and configure stock eZ </li>
<li>Write script to drop demo db, load a stock db and optionally update demo code from svn.</li>
<li>Configure cron to run script</li>
</ul>
<a name="eztoc139883_2" id="eztoc139883_2"></a><h2>External reference</h2>
<ul>
<li>Tools: <a href="https://zev.ez.no/svn/dev_tools" target="_blank">https://zev.ez.no/svn/dev_tools</a></li>
</ul>
Sat, 10 Mar 2007 19:58:02 GMTWorking with eZ publish translations
https://ezpedia.org/solution/working_with_ez_publish_translations
https://ezpedia.org/solution/working_with_ez_publish_translations<a name="eztoc136383_1" id="eztoc136383_1"></a><h2>About</h2>
<p>
eZ publish translations are both simple to create and update.
</p>
<a name="eztoc136383_2" id="eztoc136383_2"></a><h2>Dependencies</h2>
<ul>
<li><a href="/en/ez/qt" target="_self">QT</a> Toolkit</li>
<li>QT Linguist</li>
<li><a href="/en/ez/ezlupdate" target="_self">ezlupdate</a></li>
</ul>
<p>
You will want to make certain you have QT Linguist and ezlupdate created and installed properly before continuing.
</p>
<a name="eztoc136383_3" id="eztoc136383_3"></a><h2>Using QT Linguist</h2><a name="eztoc136383_3_1" id="eztoc136383_3_1"></a><h3>Using Linguist with eZ publish</h3><a name="eztoc136383_3_2" id="eztoc136383_3_2"></a><h3>Loading eZ publish translation</h3><a name="eztoc136383_3_3" id="eztoc136383_3_3"></a><h3>Modifying eZ publish translation</h3><a name="eztoc136383_3_4" id="eztoc136383_3_4"></a><h3>Saving eZ publish translation</h3><a name="eztoc136383_4" id="eztoc136383_4"></a><h2>Loading modified eZ publish translation into eZ publish</h2><a name="eztoc136383_4_5" id="eztoc136383_4_5"></a><h3>Modifying stock eZ publish</h3>
<p>
...
</p>
<a name="eztoc136383_4_6" id="eztoc136383_4_6"></a><h3>Using a translation extension</h3>
<p>
...
</p>
<a name="eztoc136383_4_7" id="eztoc136383_4_7"></a><h3>Creating an extension translation </h3> <pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ezexample<span style="color: #000000; font-weight: bold;">/</span>translations<span style="color: #000000; font-weight: bold;">/</span>
jack<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span>ez<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span>ez<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>ezlupdate <span style="color: #660033;">-u</span> <span style="color: #660033;">--extension</span> ezexample eng-US
Extension mode, directory: ezexample
eZ publish translations directory created: ezexample<span style="color: #000000; font-weight: bold;">/</span>translations<span style="color: #000000; font-weight: bold;">/</span>eng-US
eZ publish translations directory created: ezexample<span style="color: #000000; font-weight: bold;">/</span>translations<span style="color: #000000; font-weight: bold;">/</span>untranslated</pre><a name="eztoc136383_5" id="eztoc136383_5"></a><h2>External reference</h2>
<p>
Creating a translation extension
</p>
<ul>
<li><a href="https://ez.no/community/forum/setup_design/translating_from_french_to_english_using_ezwebin" target="_self">Translating from French to English using ezwebin</a></li>
</ul>
Thu, 08 Mar 2007 07:42:13 GMTOverriding the default website interface extension
https://ezpedia.org/solution/overriding_the_default_website_interface_extension
https://ezpedia.org/solution/overriding_the_default_website_interface_extension
<p>
If you want to override the default website interface style sheets and templates, here is one method of acheiving it.
</p>
<p>
Create the following structure in the extension directory:
</p>
<p>
ezwebin_custom<br />
| - design<br />
| | - ezwebin_custom<br />
| | | - images<br />
| | | - override<br />
| | | | - templates<br />
| | | - stylesheets<br />
| | | - templates<br />| - settings
</p>
<p>
In the extension/ezwebin_custom/settings directory create a file called design.ini.append.php with the following content:
</p>
<p>
<?php /*<br />
[ExtensionSettings]<br />
DesignExtensions[]=ezwebin_custom<br />*/ ?>
</p>
<p>
Edit settings/override/site.ini.append.php file and add this into the [ExtensionSettings] block:
</p>
<p>
ActiveExtensions[]=ezwebin_custom<br />Note that ezwebin_custom must be placed BEFORE ezwebin to override it. For example like:
</p>
<p>
[ExtensionSettings]<br />
ActiveExtensions[]=ezodf<br />
ActiveExtensions[]=ezdhtml<br />
ActiveExtensions[]=ezwebin_custom<br />ActiveExtensions[]=ezwebin
</p>
<p>
Edit the [DesignSettings] block of settings/siteacees/your_default_site_access so that the default SiteDesign matches the name of the design folder in your new extension e.g. design/ezwebin_custom would require setting SiteDesign=ezwebin_custom. Also make sure ezwebin is added to the AdditionalSiteDesignList. Example:
</p>
<p>
[DesignSettings]<br />
SiteDesign=ezwebin_custom<br />
AdditionalSiteDesignList[]=base<br />AdditionalSiteDesignList[]=ezwebin
</p>
<p>
Copy stylesheets from 'extension/ezwebin/design/ezwebin/stylesheets' to your custom design extension 'extension/ezwebin_custom/design/ezwebin/stylesheets'. Edit these to make style shanges.
</p>
<p>
You should now be able to create system and override templates as you would be used to in previous versions, except you will now be working in the extension/ezwebin_custom/design/ezwebin_custom directory rather than design/your_site_access/.
</p>
<p>
Class and template editing are disabled by default since the 3.9.0 release. A solution to this problem is to <a href="/en/solution/modify_siteaccessrules_to_allow_advanced_editing" target="_self">modify SiteAccessRules to allow advanced editing</a>.
</p>
Wed, 07 Mar 2007 10:58:57 GMTCreating ezpkg packages
https://ezpedia.org/solution/creating_ezpkg_packages
https://ezpedia.org/solution/creating_ezpkg_packages<a name="eztoc134418_1" id="eztoc134418_1"></a><h2>Description</h2>
<p>
You might want to create custom deb packages of your own supported eZ publish requirements.
</p>
<p>
As many distributions have poor support for PHP 4.4 branch (atm) many users find themselves installing their own software to provide PHP 4.4 or greater.
</p>
<a name="eztoc134418_1_1" id="eztoc134418_1_1"></a><h3>Examples</h3>
<p>
Examples of software possibly worth packaging for production server software management.
</p>
<ul>
<li>sitedesigns</li>
<li>extensions</li>
<li>content classes</li>
<li>content packages</li>
</ul>
<a name="eztoc134418_2" id="eztoc134418_2"></a><h2>Commands</h2>
<p>
No command summary provided at this time.
</p>
<a name="eztoc134418_3" id="eztoc134418_3"></a><h2>Create eZ extension package for 3.9</h2><a name="eztoc134418_3_2" id="eztoc134418_3_2"></a><h3>Create xyz in /a/b/c/</h3> <pre class="" style="font-family:monospace;">root@localhost:#</pre><a name="eztoc134418_3_3" id="eztoc134418_3_3"></a><h3>Paste this into vim, save and quit</h3> <pre class="" style="font-family:monospace;">#</pre><a name="eztoc134418_3_4" id="eztoc134418_3_4"></a><h3>Build deb</h3> <pre class="" style="font-family:monospace;">#</pre><a name="eztoc134418_4" id="eztoc134418_4"></a><h2>External reference</h2>
<ul>
<li>Forum: none</li>
</ul>
Tue, 06 Mar 2007 22:10:18 GMTCreating deb packages
https://ezpedia.org/solution/creating_deb_packages
https://ezpedia.org/solution/creating_deb_packages<a name="eztoc134400_1" id="eztoc134400_1"></a><h2>Description</h2>
<p>
You might want to create custom deb packages of your own supported eZ publish requirements.
</p>
<p>
As many distributions have poor support for PHP 4.4 branch (atm) many users find themselves installing their own software to provide PHP 4.4 or greater.
</p>
<a name="eztoc134400_1_1" id="eztoc134400_1_1"></a><h3>Examples</h3>
<p>
Examples of software possibly worth packaging for production server software management.
</p>
<ul>
<li>eZ</li>
<li>PHP</li>
<li>Apache </li>
<li>MySQL</li>
</ul>
<a name="eztoc134400_2" id="eztoc134400_2"></a><h2>Custom source repositories</h2>
<p>
<a href="https://www.dotdeb.org/" title="https://www.dotdeb.org/" target="_self">Dotdeb</a> is an unofficial repository containing many packages for the <b>Debian stable</b> (aka “ <i>Sarge</i>“) distribution
</p>
<p>
They have many packages which may meet your basic needs and free you from the need to create a custom package.
</p>
<a name="eztoc134400_3" id="eztoc134400_3"></a><h2>SQL</h2><a name="eztoc134400_4" id="eztoc134400_4"></a><h2>Commands</h2>
<p>
No command summary provided at this time.
</p>
<p>
The basic process is as follows
</p>
<ul>
<li>Create file</li>
<li>Build deb</li>
<li>Install PHP</li>
</ul>
<a name="eztoc134400_5" id="eztoc134400_5"></a><h2>Create PHP4.4.6 deb</h2><a name="eztoc134400_5_2" id="eztoc134400_5_2"></a><h3>Command Desc</h3> <pre class="" style="font-family:monospace;">#</pre><a name="eztoc134400_5_3" id="eztoc134400_5_3"></a><h3>Command Desc </h3> <pre class="" style="font-family:monospace;">#</pre><a name="eztoc134400_5_4" id="eztoc134400_5_4"></a><h3>Build deb</h3><a name="eztoc134400_5_5" id="eztoc134400_5_5"></a><h3> </h3> <pre class="" style="font-family:monospace;">#</pre>
<p>
Then you might ...
</p>
<pre class="" style="font-family:monospace;">#</pre><a name="eztoc134400_5_6" id="eztoc134400_5_6"></a><h3>Install deb</h3> <pre class="" style="font-family:monospace;">#</pre><a name="eztoc134400_6" id="eztoc134400_6"></a><h2>External reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/install_configuration/php_4_3_9_ez_publish_3_9_0" target="_self">PHP 4.3.9 and eZ publish 3.9.0</a> </li>
<li>Tutorial: <a href="https://www.falkotimme.com/howtos/checkinstall/" target="_self">checkinstall</a> </li>
<li>Packages: <a href="https://www.dotdeb.org/" title="https://www.dotdeb.org/" target="_self">Dotdeb</a> </li>
</ul>
Tue, 06 Mar 2007 22:03:51 GMTSelect distinct using a function definition
https://ezpedia.org/solution/select_distinct_using_a_function_definition
https://ezpedia.org/solution/select_distinct_using_a_function_definition<a name="eztoc126535_1" id="eztoc126535_1"></a><h2>Background</h2>
<p>
Summary of thread ...
</p>
<a name="eztoc126535_2" id="eztoc126535_2"></a><h2>Question</h2>
<p>
Is there any way to use a "SELECT DISTINCT" query using the following function definition?
</p>
<a name="eztoc126535_3" id="eztoc126535_3"></a><h2>Solution</h2>
<p>
See forum thread ...
</p>
<a name="eztoc126535_4" id="eztoc126535_4"></a><h2>External Reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/developer/solved_function_definition_select_distinct" target="_self">[solved] Function definition, Select Distinct</a> </li>
</ul>
Thu, 01 Mar 2007 19:43:39 GMTFetch random image
https://ezpedia.org/solution/fetch_random_image
https://ezpedia.org/solution/fetch_random_image
<div class="object-center">
<p class="editor_motivation">
This is a <a href="/en/template/stub">Stub</a> article. Help the eZ Publish community by expanding it!
</p>
</div><a name="eztoc115740_1" id="eztoc115740_1"></a><h2>Example template</h2> <pre class="eztemplate" style="font-family:monospace;"><span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$nrimages</span><span style="color: #66cc66;">=</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=fetch&SearchContentClassID=31"><span style="color: #0600FF;">fetch</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'content'</span>, <span style="color: #dd0000;">'tree_count'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=hash&SearchContentClassID=31"><span style="color: #0600FF;">hash</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'parent_node_id'</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #dd0000;">'class_filter_type'</span>, <span style="color: #dd0000;">'include'</span>, <span style="color: #dd0000;">'class_filter_array'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #dd0000;">'image'</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$randomimage</span><span style="color: #66cc66;">=</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=fetch&SearchContentClassID=31"><span style="color: #0600FF;">fetch</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'content'</span>, <span style="color: #dd0000;">'tree'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=hash&SearchContentClassID=31"><span style="color: #0600FF;">hash</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'parent_node_id'</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #dd0000;">'class_filter_type'</span>, <span style="color: #dd0000;">'include'</span>, <span style="color: #dd0000;">'class_filter_array'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=array&SearchContentClassID=31"><span style="color: #0600FF;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #dd0000;">'image'</span><span style="color: #66cc66;">)</span>, <span style="color: #dd0000;">'offset'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=rand&SearchContentClassID=31"><span style="color: #0600FF;">rand</span></a><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">0</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=dec&SearchContentClassID=31"><span style="color: #0600FF;">dec</span></a><span style="color: #66cc66;">(</span><span style="color: #0000bb;">$nrimages</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>, <span style="color: #dd0000;">'limit'</span>, <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=content_view_gui&SearchContentClassID=34"><span style="color: #0600FF;">content_view_gui</span></a> <span style="color: #007700;">content_object</span><span style="color: #66cc66;">=</span><span style="color: #0000bb;">$randomimage</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span> <span style="color: #007700;">view</span><span style="color: #66cc66;">=</span>embed<span style="color: #66cc66;">}</span></pre><a name="eztoc115740_2" id="eztoc115740_2"></a><h2>Reference</h2>
<ul>
<li>Forum: N/A</li>
</ul>
Fri, 23 Feb 2007 08:03:40 GMTCreating rpm packages
https://ezpedia.org/solution/creating_rpm_packages
https://ezpedia.org/solution/creating_rpm_packages<a name="eztoc106352_1" id="eztoc106352_1"></a><h2>Description</h2>
<p>
You might want to create custom rpm packages of your own supported eZ publish requirements.
</p>
<p>
As many distributions have poor support for PHP 4.4 branch (atm) many users find themselves installing their own software to provide PHP 4.4 or greater.
</p>
<a name="eztoc106352_1_1" id="eztoc106352_1_1"></a><h3>Examples</h3>
<p>
Examples of software possibly worth packaging for production server software management.
</p>
<ul>
<li>eZ</li>
<li>PHP</li>
<li>Apache </li>
<li>MySQL</li>
</ul>
<a name="eztoc106352_2" id="eztoc106352_2"></a><h2>Commands</h2>
<p>
No command summary provided at this time.
</p>
<p>
The basic process is as follows
</p>
<ul>
<li>Create spec file</li>
<li>Build rpm and srpm</li>
<li>Install PHP</li>
</ul>
<a name="eztoc106352_3" id="eztoc106352_3"></a><h2>Create PHP4.4.6 RPM</h2><a name="eztoc106352_3_2" id="eztoc106352_3_2"></a><h3>Create Spec File</h3> <pre class="" style="font-family:monospace;">root@lotta:~/> vim /usr/src/packages/SPECS/.spec</pre><a name="eztoc106352_3_3" id="eztoc106352_3_3"></a><h3>Build rpm and srpm</h3> <pre class="" style="font-family:monospace;">root@lotta:~/> cd /usr/src/packages/BUILD
root@lotta:/usr/src/packages/BUILD> rpmbuild -ba .spec</pre><a name="eztoc106352_3_4" id="eztoc106352_3_4"></a><h3>Install PHP rpm</h3> <pre class="" style="font-family:monospace;">root@lotta:~/> rpm -i /usr/src/packages/RPMS/i586/php-4.4.6-1.i586.rpm</pre><a name="eztoc106352_4" id="eztoc106352_4"></a><h2>Example Spec Files</h2><a name="eztoc106352_4_5" id="eztoc106352_4_5"></a><h3>Create PHP4.4.6 RPM for Suse Linux Enterprise Server 10</h3>
<p>
<b>Paste this into the file </b>/usr/src/packages/SPECS/.spec
</p>
<pre class="" style="font-family:monospace;">%define name php
%define version 4.4.6
%define release <span style="">1</span>
%define _prefix /usr
%define var --with-apxs2=/usr/sbin/apxs2-prefork --with-gd --with-t1lib --with-jpeg-dir --with-png-dir --with-zlib-dir --with-ttf --with-freetype-dir --with-t1lib --enable-gd-native-ttf --enable-gd-jis-conv --enable-bcmath --enable-calendar --with-curl --with-dom --with-xmlrpc --enable-ftp --with-iconv --with-gettext --enable-mbstring --with-mcrypt --with-mhash --enable-sockets
Summary: PHP is a server-side scripting language for creating dynamic Web pages
Name: %<span class="br0">{</span>name<span class="br0">}</span>
Version: %<span class="br0">{</span>version<span class="br0">}</span>
Release: %<span class="br0">{</span>release<span class="br0">}</span>
Source: https://no.php.net/distributions/%<span class="br0">{</span>name<span class="br0">}</span>-%<span class="br0">{</span>version<span class="br0">}</span>.tar.gz
Vendor: The PHP Group
URL: https://www.php.net/
License: The PHP License
Group: System Environment/Libraries
Prefix: != %<span class="br0">{</span>_prefix<span class="br0">}</span>
BuildRoot: /tmp/%<span class="br0">{</span>name<span class="br0">}</span>-buildroot
%files
/bin
/include
/lib
/etc
/man
%defattr<span class="br0">(</span>-,root,root<span class="br0">)</span>
%description
PHP is a server-side scripting language for creating dynamic Web pages.
%prep
%setup -q
%build
echo %<span class="br0">{</span>_prefix<span class="br0">}</span>
./configure --prefix=$RPM_BUILD_ROOT %<span class="br0">{</span>var<span class="br0">}</span>
make
%install
rm -rf $RPM_BUILD_ROOT
make ROOT="$RPM_BUILD_ROOT" install
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Mar <span style="">6</span> <span style="">2007</span> Kim Johansen <[email protected]>
- First draft of the spec file</pre><a name="eztoc106352_4_6" id="eztoc106352_4_6"></a><h3>Create PHP4.4.6 RPM for CentOS 4.4</h3>
<p>
<b>Paste this into the file </b>/usr/src/packages/SPECS/.spec
</p>
<pre class="" style="font-family:monospace;">%define name php
%define version 4.4.6
%define release <span style="">1</span>
%define _prefix /usr
%define var --with-apxs2=/usr/sbin/apxs --with-gd --with-t1lib --with-jpeg-dir --with-pn\
g-dir --with-zlib-dir --with-ttf=/usr/include/freetype1 --with-freetype-dir=/usr/include/freetype2 --with\
-t1lib --enable-gd-native-ttf --enable-gd-jis-conv --enable-bcmath --enable-calendar --with-curl --with-d\
om --with-xmlrpc --enable-ftp --with-iconv --with-gettext --enable-mbstring --with-mcrypt --with-mhash --\
enable-sockets
Summary: PHP is a server-side scripting language for creating dynamic Web pages
Name: %<span class="br0">{</span>name<span class="br0">}</span>
Version: %<span class="br0">{</span>version<span class="br0">}</span>
Release: %<span class="br0">{</span>release<span class="br0">}</span>
Source: https://no.php.net/distributions/%<span class="br0">{</span>name<span class="br0">}</span>-%<span class="br0">{</span>version<span class="br0">}</span>.tar.gz
Vendor: The PHP Group
URL: https://www.php.net/
License: The PHP License
Group: System Environment/Libraries
Prefix: != %<span class="br0">{</span>_prefix<span class="br0">}</span>
BuildRoot: /tmp/%<span class="br0">{</span>name<span class="br0">}</span>-buildroot
%files
/bin
/include
/lib
/etc
/man
%defattr<span class="br0">(</span>-,root,root<span class="br0">)</span>
%description
PHP is a server-side scripting language for creating dynamic Web pages.
%prep
%setup -q
%build
echo %<span class="br0">{</span>_prefix<span class="br0">}</span>
./configure --prefix=$RPM_BUILD_ROOT %<span class="br0">{</span>var<span class="br0">}</span>
make
%install
rm -rf $RPM_BUILD_ROOT
make ROOT="$RPM_BUILD_ROOT" install
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Mar <span style="">9</span> <span style="">2007</span> Graham Brookins <[email protected]>
- First draft of the spec file</pre><a name="eztoc106352_5" id="eztoc106352_5"></a><h2>External reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/install_configuration/php_4_3_9_ez_publish_3_9_0" target="_self">PHP 4.3.9 and eZ publish 3.9.0</a> </li>
<li><a href="https://php.net" target="_blank">PHP</a></li>
<li><a href="https://www.rpm.org/max-rpm-snapshot/" target="_blank">RPM HOWTO</a></li>
</ul>
Sat, 17 Feb 2007 18:16:29 GMTCreating and maintaining an eZ publish patch
https://ezpedia.org/solution/creating_and_maintaining_an_ez_publish_patch
https://ezpedia.org/solution/creating_and_maintaining_an_ez_publish_patch
<p>
While I have little hesitation in creating a patch directory structure within an the related extension or settings extension for the instance of that site installation there is a bit of work in keeping track of these modifications or <a href="/en/ez/patch" target="_self">patches</a> for future upgrades.
</p>
<a name="eztoc103135_1" id="eztoc103135_1"></a><h2>Storing patch files in an extension </h2>
<p>
This makes patching fairly simple to repeat. Sometimes I use a <a href="/en/ez/patch" target="_self">patch</a> file, sometimes I only use instances of the modified file and original file.
</p>
<p>
Path: [ <i>Patch Base Path</i>] + [ <i>Version of eZ</i>] + [ <i>Relative Stock Path</i>]
</p>
<pre class="bash" style="font-family:monospace;">extension<span style="color: #000000; font-weight: bold;">/</span>ezexample<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">patch</span>
extension<span style="color: #000000; font-weight: bold;">/</span>ezexample<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">patch</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.8</span>
extension<span style="color: #000000; font-weight: bold;">/</span>ezexample<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">patch</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.9</span>
extension<span style="color: #000000; font-weight: bold;">/</span>ezexample<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">patch</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.10</span>
extension<span style="color: #000000; font-weight: bold;">/</span>ezexample<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">patch</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.10</span><span style="color: #000000; font-weight: bold;">/</span>kernel<span style="color: #000000; font-weight: bold;">/</span>shop<span style="color: #000000; font-weight: bold;">/</span>module.php
extension<span style="color: #000000; font-weight: bold;">/</span>ezexample<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">patch</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.10</span><span style="color: #000000; font-weight: bold;">/</span>kernel<span style="color: #000000; font-weight: bold;">/</span>shop<span style="color: #000000; font-weight: bold;">/</span>module.php.orig
extension<span style="color: #000000; font-weight: bold;">/</span>ezexample<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">patch</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.10</span><span style="color: #000000; font-weight: bold;">/</span>kernel<span style="color: #000000; font-weight: bold;">/</span>shop<span style="color: #000000; font-weight: bold;">/</span>module.php.diff</pre><a name="eztoc103135_1_1" id="eztoc103135_1_1"></a><h3>Example</h3>
<p>
Example of extension's which include kernel patches and or patch directory structure. (...)
</p>
<a name="eztoc103135_2" id="eztoc103135_2"></a><h2>Include path</h2>
<p>
Still, I can't remember if my tests in modifying the include_path were successful, I don't remember using it regularly after my first encounter with it.
</p>
<p>
The idea being you can add a file path to the php include path configuration variable which should allow you to be able to in affect override a specific stock file without having to actualy replace the stock file.
</p>
<a name="eztoc103135_2_2" id="eztoc103135_2_2"></a><h3>Example php.ini setting</h3>
<p>
Example of the php.ini setting requirered to override a stock eZ publish file (kernel or lib) (...)
</p>
<a name="eztoc103135_3" id="eztoc103135_3"></a><h2>External reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/developer/core_extend_kernel_code" target="_self">core extend kernel code</a> </li>
</ul>
Thu, 15 Feb 2007 23:31:07 GMTOverriding the eZ Web Interface (ezwebin) with custom designs
https://ezpedia.org/solution/overriding_the_ez_web_interface_ezwebin_with_custom_designs
https://ezpedia.org/solution/overriding_the_ez_web_interface_ezwebin_with_custom_designs
<p>
The original source for most of this material comes from a <a href="https://serwatka.net/index.php/en/blog/website_interface_customization_tips" target="_self">blog post by an eZ publish developer</a>.
</p>
<p>
If you've installed 3.9.0 with the eZ Web Interface (hereinafter referred to as ezwebin) but need to customize your siteaccess to differ from the demo design, your first step is to get your hierarchies organized to override the default ezwebin design on a per-siteaccess basis.
</p>
<p>
<b>Note</b>: pay careful attention to order of ActiveExtensions in following two examples. In case of CSS your extension has to be listed <b>below</b> ezwebin, but for templates <b>above</b> it.
</p>
<a name="eztoc88974_0_1" id="eztoc88974_0_1"></a><h3><b>To Modify CSS (Without Modifying Templates)</b></h3>
<p>
1. Go to your /extension/directory and replicate the structure of ezwebin for your own design name. For example, if your siteaccess is "my_siteaccess" and your desired design is "my_design" then you'll create a structure as follows:
</p>
<p>
extension<br />
| -ezwebin<br />
| -my_design<br />
| | -- design<br />
| | | --- ezwebin<br />
| | | |---- images<br />
| | | |---- stylesheets<br />
| | | |---- templates<br />| | -- settings
</p>
<p>
Note that you want to leave the original ezwebin directory intact, but merely mimic its' structure. Also, note that in the my_design/design directory, the correct name of the child is ezwebin (for 3.9.0) as this is where your CSS overrides will be placed and seen by the system.
</p>
<p>
2. Next, you'll want to initialize your design in the system. Go to extension/my_design/settings/ and create a new file named "design.ini.append.php" Inside, specify the following settings:
</p>
<p>
<?php /*<br />
[ExtensionSettings]<br />
DesignExtensions[]=my_design<br />*/ ?>
</p>
<p>
3. Now is the best time to copy the CSS files and templates from extension/ezwebin/design/ezwebin into your newly created extension/my_design/design/ezwebin so you can modify their contents to suit your design needs.
</p>
<p>
4. Next, you'll need to make the system aware that your new "extension" (conceptually) exists. To do that, go to settings/override/site.ini.append.php and open it for editing. Find the section for [ExtensionSettings] and active your extension LAST (in order) as follows:
</p>
<p>
[ExtensionSettings]<br />
ActiveExtensions[]<br />
ActiveExtensions[]=ezwebin<br />
ActiveExtensions[]=ezdhtml<br />
ActiveExtensions[]=ezodf<br />ActiveExtensions[]=my_design
</p>
<p>
5. Last, you'll need to edit the settings/siteaccess/my_siteaccess/site.ini.append.php to make it aware that your extension design exists. Add your design FIRST (in order), although it may seem a little counter-intuitive at first glance.
</p>
<p>
[DesignSettings]<br />
SiteDesign=my_design<br />
AdditionalSiteDesignList[]=ezwebin<br />AdditionalSiteDesignList[]=base
</p>
<p>
6. You're done. Login to your Admin view and clear *all* cache. Voila, your new CSS files will be used.
</p>
<p>
NOTE: At this time, <a href="https://issues.ez.no/IssueView.php?Id=10184&activeItem=1" target="_self">there appears to be a bug</a>. CSS file are honored by the system (but templates are currently not honored).
</p>
<a name="eztoc88974_0_2" id="eztoc88974_0_2"></a><h3>To Modify Templates (Without Modifying CSS)</h3>
<p>
1. Go to your /extension/directory and replicate the structure of ezwebin for your own design name. For example, if your siteaccess is "my_siteaccess" and your desired design is "my_design" then you'll create a structure as follows:
</p>
<p>
extension<br />
| -ezwebin<br />
| -my_design<br />
| | -- design<br />
| | | --- ezwebin<br />
| | | |---- images<br />
| | | |---- stylesheets<br />
| | | |---- templates<br />| | -- settings
</p>
<p>
Note that you want to leave the original ezwebin directory intact, but merely mimic its' structure. Also, note that in the my_design/design directory, the correct name of the child is ezwebin (for 3.9.0) as this is where your TPL overrides will be placed and seen by the system.
</p>
<p>
2. Next, you'll want to initialize your design in the system. Go to extension/my_design/settings/ and create a new file named "design.ini.append.php" Inside, specify the following settings:
</p>
<p>
<?php /*<br />
[ExtensionSettings]<br />
DesignExtensions[]=my_design<br />*/ ?>
</p>
<p>
3. Now is the best time to copy the CSS files and templates from extension/ezwebin/design/ezwebin into your newly created extension/my_design/design/ezwebin so you can modify their contents to suit your design needs.
</p>
<p>
4. Next, you'll need to make the system aware that your new "extension" (conceptually) exists. To do that, go to settings/override/site.ini.append.php and open it for editing. Find the section for [ExtensionSettings] and active your extension ABOVE ezwebin (in order) as follows:
</p>
<p>
[ExtensionSettings]<br />
ActiveExtensions[]<br />
ActiveExtensions[]=ezdhtml<br />
ActiveExtensions[]=ezodf<br />
ActiveExtensions[]=my_design<br />ActiveExtensions[]=ezwebin
</p>
<p>
5. Last, you'll need to edit the settings/siteaccess/my_siteaccess/site.ini.append.php to make it aware that your extension design exists. Add your design FIRST (in order), although it may seem a little counter-intuitive at first glance.
</p>
<p>
[DesignSettings]<br />
SiteDesign=my_design<br />
AdditionalSiteDesignList[]=ezwebin<br />AdditionalSiteDesignList[]=base
</p>
<p>
6. You're done. Login to your Admin view and clear *all* cache. Voila, your new TPL files will be used.
</p>
<p>
NOTE: At this time, <a href="https://issues.ez.no/IssueView.php?Id=10184&activeItem=1" target="_self">there appears to be a bug</a>. TPL file are honored by the system (but stylesheets are currently not honored).
</p>
<a name="eztoc88974_0_3" id="eztoc88974_0_3"></a><h3>To Modify Both CSS and Templates (Special Case)</h3>
<p>
You must consider your implementation of eZ publish. This workaround is valid if 1) you have only one frontpage/user view (non-admin view) siteaccess OR 2) if all your frontpage/user view (non-admin view) siteaccesses will use the CSS changes. This work around is not valid if you have multiple siteaccesses which must use different stylesheets.
</p>
<p>
The strategy here is to setup template overrides in the method recommended by eZ Systems, then to craft a workaround so CSS overrides are used (across all non-admin siteaccesses).
</p>
<p>
1. Go to your /extension/directory and replicate the structure of ezwebin for your own design name. For example, if your siteaccess is "my_siteaccess" and your desired design is "my_design" then you'll create a structure as follows:
</p>
<p>
extension<br />
| -ezwebin<br />
| -my_design<br />
| | -- design<br />
| | | --- ezwebin<br />
| | | |---- images<br />
| | | |---- stylesheets<br />
| | | |---- templates<br />| | -- settings
</p>
<p>
Note that you want to leave the original ezwebin directory intact, but merely mimic its' structure. Also, note that in the my_design/design directory, the correct name of the child is ezwebin (for 3.9.0) as this is where your TPL overrides will be placed and seen by the system.
</p>
<p>
2. Next, you'll want to initialize your design in the system. Go to extension/my_design/settings/ and create a new file named "design.ini.append.php" Inside, specify the following settings:
</p>
<p>
<?php /*<br />
[ExtensionSettings]<br />
DesignExtensions[]=my_design<br />*/ ?>
</p>
<p>
3. Now is the best time to copy the CSS files and templates from extension/ezwebin/design/ezwebin into your newly created extension/my_design/design/ezwebin so you can modify their contents to suit your design needs.
</p>
<p>
4. Next, you'll need to make the system aware that your new "extension" (conceptually) exists. To do that, go to settings/override/site.ini.append.php and open it for editing. Find the section for [ExtensionSettings] and active your extension ABOVE ezwebin (in order) as follows:
</p>
<p>
[ExtensionSettings]<br />
ActiveExtensions[]<br />
ActiveExtensions[]=ezdhtml<br />
ActiveExtensions[]=ezodf<br />
ActiveExtensions[]=my_design<br />ActiveExtensions[]=ezwebin
</p>
<p>
5. Last, you'll need to edit the settings/siteaccess/my_siteaccess/site.ini.append.php to make it aware that your extension design exists. Add your design FIRST (in order), although it may seem a little counter-intuitive at first glance.
</p>
<p>
[DesignSettings]<br />
SiteDesign=my_design<br />
AdditionalSiteDesignList[]=ezwebin<br />AdditionalSiteDesignList[]=base
</p>
<p>
6. Place your modified CSS files in extension/my_design/design/ezwebin/override/stylesheets (reminder: this will affect all your non-admin siteaccesses which use the eZ Web Interface).
</p>
<p>
7. Place any images need by your CSS files into extension/my_design/design/ezwebin/overrides/images
</p>
<p>
8. You're done. Login to your Admin view and clear *all* cache. Voila, both your new TPL files and your new CSS will be used on all siteaccesses which use the ezwebin (eZ Web Interface).
</p>
<p>
<b>To Modify Both CSS and Templates (Universal Method)</b>
</p>
<p>
There is not currently a verified workaround strategy which will allow targeting of individual siteaccesses for both modified CSS and Templates. The <a href="https://issues.ez.no/IssueView.php?Id=10184" target="_self">bug report</a> contains some suggested methods, but they are not yet verified as working (please note eZ Systems has asked no further discussion on the bug report itself, so please discuss this issue either on the eZ forums or IRC (Freenode #ezpublish).
</p>
Wed, 07 Feb 2007 20:22:06 GMTRead-only site
https://ezpedia.org/solution/read_only_site
https://ezpedia.org/solution/read_only_site
<p>
<i>For a general description of read-only, we recommend </i><a href="https://en.wikipedia.org/wiki/Read_only" target="_self"><i>Read-only on Wikipedia</i></a><i>.</i>
</p>
<a name="eztoc66541_1" id="eztoc66541_1"></a><h2>Howto</h2>
<p>
You can temporarily make your eZ publish site read-only, for example when
</p>
<ul>
<li>you're moving it to another server</li>
<li>you want to upgrade it to a new major release, but because you don't want to have a downtime you made a copy of it on which you will run the upgrade script and which will become the new "production" site</li>
</ul>
<p>
Use the following site access rule settings in <i>settings/override/site.ini.append.php</i> to make your site read-only. Note that this also affects the administration interface.
</p>
<pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">[</span>SiteAccessRules<span style="">]</span></span>
Rules<span style="">[</span><span style="">]</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>access<span style="color: #666666; font-style: italic;">;disable</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>moduleall
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>access<span style="color: #666666; font-style: italic;">;enable</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>module<span style="color: #666666; font-style: italic;">;content/view</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>module<span style="color: #666666; font-style: italic;">;content/download</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>module<span style="color: #666666; font-style: italic;">;content/search</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>module<span style="color: #666666; font-style: italic;">;content/advancedsearch</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>module<span style="color: #666666; font-style: italic;">;user/login</span>
Rules<span style="">[</span><span style="">]</span><span style="color: #000066; font-weight:bold;">=</span>module<span style="color: #666666; font-style: italic;">;user/logout</span></pre>
<p>
Depending on the functionality of your site, you can still choose to allow access to other modules and views, like <i>user/preferences</i>.
</p>
<a name="eztoc66541_2" id="eztoc66541_2"></a><h2>Known bugs</h2>
<ul>
<li><a href="https://issues.ez.no/9953" target="_self">#9953</a>: website root / disabled although access to the content/view module is enabled (fixed in 3.9.1, 3.8.7, 3.7.10, 3.6.12)</li>
</ul>
<a name="eztoc66541_3" id="eztoc66541_3"></a><h2>External resources</h2>
<ul>
<li><a href="https://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/siteaccessrules" target="_self">SiteAccessRules documentation</a></li>
</ul>
Tue, 23 Jan 2007 07:55:36 GMTDynamic Layouts - Managing Style as Content
https://ezpedia.org/solution/dynamic_layouts_managing_style_as_content
https://ezpedia.org/solution/dynamic_layouts_managing_style_as_content<a name="eztoc63129_1" id="eztoc63129_1"></a><h2>About</h2>
<p>
This is a different approach to template design. It is the creation of a container class, <b>Div</b>, that allows the content editor (or designer) to style the <b>div</b> and store the settings as content.
</p>
<p>
The div content is object relations into the system. This allows a great amount of design control, without requiring template or CSS modifications.
</p>
<a name="eztoc63129_2" id="eztoc63129_2"></a><h2>Application</h2>
<p>
The intent of this class and template is to allow page-specific styles, images, and layouts to be applied to single pages, without creating node override templates or custom classes. Page-specific images that are placed in CSS files create a significant amount of overhead, and this alleviates that overhead, and makes the images more manageable.
</p>
<a name="eztoc63129_3" id="eztoc63129_3"></a><h2><b>Notes</b></h2>
<p>
The objective of the class is primarily layout, to divide the {$module_result.content} area into divs that can be managed as eZ content, instead of templates with CSS files. It is a recursive looping template, that first delivers a named div, then the style tags of the container, followed by the styled div, and including the children, with the same approach. The children use object relations to refer to content within the system.
</p>
<a name="eztoc63129_4" id="eztoc63129_4"></a><h2>Class</h2>
<p>
The class has the following attributes:
</p>
<ul>
<li>Name - Name of div, and object/node</li>
<li>Class - General CSS class - can be used in conjunction with CSS files</li>
<li>Style - Text block with any style tag content. {} will be added by the template</li>
<li>Background Image - Web ready background image. Original image will be used. Height and width can be entered manually, or omitted.</li>
<li>Content - Optional object relations to content within the system. node/view/line is used to display content</li>
</ul>
<a name="eztoc63129_5" id="eztoc63129_5"></a><h2>Template</h2> <pre class="" style="font-family:monospace;"><span class="br0">{</span>def $children=fetch<span class="br0">(</span>&apos;content&apos;,&apos;list&apos;,hash<span class="br0">(</span>parent_node_id,$node.node_id,sort_by,$node.sort_array<span class="br0">)</span><span class="br0">)</span><span class="br0">}</span>
<div name="<span class="br0">{</span>$node.name|wash<span class="br0">}</span>">
<style>
#<span class="br0">{</span>$node.name|wash<span class="br0">}</span>
<span class="br0">{</span>ldelim<span class="br0">}</span>
<span class="br0">{</span>$node.data_map.style.content<span class="br0">}</span>
<span class="br0">{</span>if $node.data_map.background_image.has_content<span class="br0">}</span>
background-image: url<span class="br0">(</span><span class="br0">{</span>$node.data_map.background_image.content.original.url|ezroot<span class="br0">(</span>&apos;single&apos;,&apos;full&apos;<span class="br0">)</span><span class="br0">}</span><span class="br0">)</span>;
<span class="br0">{</span>/if<span class="br0">}</span>
<span class="br0">{</span>rdelim<span class="br0">}</span>
</style>
<div id="<span class="br0">{</span>$node.name|wash<span class="br0">}</span>" class="<span class="br0">{</span>$node.data_map.class.content|wash<span class="br0">}</span>" >
<span class="br0">{</span>if $children|count|gt<span class="br0">(</span><span style="">0</span><span class="br0">)</span><span class="br0">}</span>
<span class="br0">{</span>foreach $children as $k => $v<span class="br0">}</span>
<span class="br0">{</span>node_view_gui content_node=$v view="full"<span class="br0">}</span>
<span class="br0">{</span>/foreach<span class="br0">}</span>
<span class="br0">{</span>else<span class="br0">}</span>
<span class="br0">{</span>def $related_objects=fetch<span class="br0">(</span>&apos;content&apos;,&apos;related_objects&apos;,hash<span class="br0">(</span>&apos;object_id&apos;,$node.object.id,&apos;all_relations&apos;, true<span class="br0">(</span><span class="br0">)</span><span class="br0">)</span><span class="br0">)</span><span class="br0">}</span>
<div id="<span class="br0">{</span>$node.name|wash<span class="br0">}</span>" class="<span class="br0">{</span>$node.data_map.class.content|wash<span class="br0">}</span>" >
<span class="br0">{</span>foreach $related_objects as $k => $v<span class="br0">}</span>
<span class="br0">{</span>node_view_gui content_node=$v.main_node view="line"<span class="br0">}</span>
<span class="br0">{</span>/foreach<span class="br0">}</span>
<span class="br0">{</span>/if<span class="br0">}</span>
</div>
</div>
<span class="br0">{</span>undef<span class="br0">}</span></pre>Sun, 21 Jan 2007 06:49:39 GMTScript to delete all nodes under a node in content structure
https://ezpedia.org/solution/script_to_delete_all_nodes_under_a_node_in_content_structure
https://ezpedia.org/solution/script_to_delete_all_nodes_under_a_node_in_content_structure<a name="eztoc52343_1" id="eztoc52343_1"></a><h2>About</h2>
<p>
This is a script to delete all nodes under some tree.<br />Please note that this script may use large amounts of memory.
</p>
<a name="eztoc52343_2" id="eztoc52343_2"></a><h2>Source</h2> <pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;"><?php</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'lib/ezutils/classes/ezcli.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/ezscript.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'kernel/classes/ezcontentobjecttreenode.php'</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> deleteNodes<span style="color: #009900;">(</span> <span style="color: #000088;">$classID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$parentNodeID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span> <span style="color: #009900;">)</span>
<span style="color: #009900;">{</span>
<a href="https://www.php.net/global"><span style="color: #990000;">global</span></a> <span style="color: #000088;">$db</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$deleteIDArray</span> <span style="color: #339933;">=</span> <a href="https://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$nodeArray</span> <span style="color: #339933;">=&</span> eZContentObjectTreeNode<span style="color: #339933;">::</span><span style="color: #004000;">subTree</span><span style="color: #009900;">(</span> <a href="https://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span> <span style="color: #0000ff;">'ClassFilterType'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'include'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ClassFilterArray'</span> <span style="color: #339933;">=></span> <span style="color: #000088;">$classID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Depth'</span> <span style="color: #339933;">=></span> <span style="color: #000088;">$depth</span><span style="color: #339933;">,</span> <span style="color: #009900;">)</span><span style="color: #339933;">,</span> <span style="color: #000088;">$parentNodeID</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<a href="https://www.php.net/print"><span style="color: #990000;">print</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">"Deleting "</span> <span style="color: #339933;">.</span> <a href="https://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$nodeArray</span><span style="color: #009900;">)</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">" nodes. If that is not what you want it would be good to press ctrl-c now.. deleting starts in 20 seconds!!<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<a href="https://www.php.net/sleep"><span style="color: #990000;">sleep</span></a><span style="color: #009900;">(</span><span style="color: #cc66cc;">20</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$deletecount</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$deleteIDArray</span> <span style="color: #339933;">=</span> <a href="https://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">(</span> <span style="color: #000088;">$nodeArray</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node</span> <span style="color: #009900;">)</span>
<span style="color: #009900;">{</span>
<a href="https://www.php.net/print"><span style="color: #990000;">print</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">"Deleting node "</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-></span><span style="color: #004000;">attribute</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'main_node_id'</span> <span style="color: #009900;">)</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' , "'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-></span><span style="color: #004000;">attribute</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'url_alias'</span> <span style="color: #009900;">)</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">"'<span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
eZContentObjectTreeNode<span style="color: #339933;">::</span><span style="color: #004000;">removeSubtrees</span><span style="color: #009900;">(</span> <a href="https://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-></span><span style="color: #004000;">attribute</span><span style="color: #009900;">(</span> <span style="color: #0000ff;">'main_node_id'</span> <span style="color: #009900;">)</span> <span style="color: #009900;">)</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$deletecount</span><span style="color: #339933;">++;</span>
<a href="https://www.php.net/print"><span style="color: #990000;">print</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">"<span style="color: #006699; font-weight: bold;">$deletecount</span>, "</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span>
<span style="color: #009900;">}</span>
<span style="color: #000088;">$cli</span> <span style="color: #339933;">=&</span> eZCLI<span style="color: #339933;">::</span><span style="color: #004000;">instance</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// change the admin-password! see below ...</span>
<span style="color: #000088;">$script</span> <span style="color: #339933;">=&</span> eZScript<span style="color: #339933;">::</span><span style="color: #004000;">instance</span><span style="color: #009900;">(</span> <a href="https://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span> <span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=></span> <span style="color: #009900;">(</span> <span style="color: #0000ff;">"delete nodes ...<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #339933;">.</span><span style="color: #0000ff;">"delete main nodes ...,<span style="color: #000099; font-weight: bold;">\n</span>"</span> <span style="color: #009900;">)</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'use-session'</span> <span style="color: #339933;">=></span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'use-modules'</span> <span style="color: #339933;">=></span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'use-extensions'</span> <span style="color: #339933;">=></span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'user'</span> <span style="color: #339933;">=></span> <a href="https://www.php.net/array"><span style="color: #990000;">array</span></a> <span style="color: #009900;">(</span> <span style="color: #0000ff;">'login'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'admin'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'ADMINPASS'</span> <span style="color: #009900;">)</span><span style="color: #339933;">,</span>
<span style="color: #009900;">)</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$script</span><span style="color: #339933;">-></span><span style="color: #004000;">startup</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$script</span><span style="color: #339933;">-></span><span style="color: #004000;">getOptions</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$script</span><span style="color: #339933;">-></span><span style="color: #004000;">initialize</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<a href="https://www.php.net/set_time_limit"><span style="color: #990000;">set_time_limit</span></a><span style="color: #009900;">(</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 'deleteNodes' function, used to remove all nodes under passed node_id</span>
<span style="color: #666666; font-style: italic;">// example usage of 'deleteNodes' function: deleteNodes( $classID, $parentNodeID, $depth )</span>
deleteNodes<span style="color: #009900;">(</span> <a href="https://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span> <span style="color: #0000ff;">'article'</span> <span style="color: #009900;">)</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">6713</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?></span></pre>Sun, 14 Jan 2007 23:47:06 GMTChange the language of existing content objects
https://ezpedia.org/solution/change_the_language_of_existing_content_objects
https://ezpedia.org/solution/change_the_language_of_existing_content_objects<a name="eztoc51171_1" id="eztoc51171_1"></a><h2>About</h2>
<p>
This is an example solution.
</p>
<a name="eztoc51171_2" id="eztoc51171_2"></a><h2>eng-GB -> eng-US</h2>
<p>
Convert from eng-GB to eng-US
</p>
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> ezcontentobject_name
<span style="color: #993333; font-weight: bold;">SET</span>
content_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-US'</span><span style="color: #66cc66;">,</span>
real_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-US'</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>
content_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-GB'</span> <span style="color: #993333; font-weight: bold;">AND</span>
real_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-GB'</span>;</pre><a name="eztoc51171_3" id="eztoc51171_3"></a><h2>eng-GB -> ger-DE</h2>
<p>
Convert from eng-GB to ger-DE
</p>
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> ezcontentobject_name
<span style="color: #993333; font-weight: bold;">SET</span>
content_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ger-DE'</span><span style="color: #66cc66;">,</span>
real_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ger-DE'</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>
content_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-GB'</span> <span style="color: #993333; font-weight: bold;">AND</span>
real_translation<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-GB'</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> ezcontentobject_attribute
<span style="color: #993333; font-weight: bold;">SET</span>
language_code<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ger-DE'</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>
language_code<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-GB'</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> ezcontent_translation
<span style="color: #993333; font-weight: bold;">SET</span>
locale<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ger-DE'</span><span style="color: #66cc66;">,</span>
name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'Deutsch (Deutschland)'</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>
locale<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'eng-GB'</span>;</pre><a name="eztoc51171_4" id="eztoc51171_4"></a><h2>External Reference</h2>
<ul>
<li><a href="https://ez.no/community/forum/install_configuration/how_can_i_change_the_language_of_ez_to_spanish" target="_self">How can I change the language of existing content objects?</a></li>
</ul>
Sun, 14 Jan 2007 07:42:42 GMTCreating shorter paths
https://ezpedia.org/solution/creating_shorter_paths
https://ezpedia.org/solution/creating_shorter_paths<a name="eztoc45573_1" id="eztoc45573_1"></a><h2>Summary</h2>
<p>
Information from andre1 in the technical manual reference for siteaccess settings, <a href="https://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/siteaccesssettings/pathprefix" target="_self">pathprefix</a>, and from Dirk Schmedding on the <a href="https://lists.ez.no/pipermail/sdk-public/2006-May/002151.html" target="_self">list</a>.
</p>
<a name="eztoc45573_2" id="eztoc45573_2"></a><h2>Example</h2>
<p>
You can use the PathPrefix setting in a siteaccess' site.ini to remove parts of the URL. For example:
</p>
<pre class="" style="font-family:monospace;"><span class="br0">[</span>SiteAccessSettings<span class="br0">]</span>
PathPrefix=dir</pre>
<p>
Old url: www.example.org/dir/subdir/some_content<br />New url: www.example.org/subdir/some_content
</p>
<p>
Or alternatively:
</p>
<pre class="" style="font-family:monospace;"><span class="br0">[</span>SiteAccessSettings<span class="br0">]</span>
PathPrefix=dir/subdir/</pre>
<p>
old url: www.example.org/dir/subdir/some_content<br />new url: www.example.org/some_content
</p>
<a name="eztoc45573_2_1" id="eztoc45573_2_1"></a><h3>PathPrefixExclude</h3>
<p>
If you have a structure like this:
</p>
<p>
www.example.org/foo<br />
www.example.org/foo/bar<br />www.example.org/baz
</p>
<p>
and you set your PathPrefix like this:
</p>
<pre class="" style="font-family:monospace;"><span class="br0">[</span>SiteAccessSettings<span class="br0">]</span>
PathPrefix=foo</pre>
<p>
You will then be unable to access www.example.org/baz. However, you can use PathPrefixExclude to specify URLs that are not subject to PathPrefix, like this:
</p>
<pre class="" style="font-family:monospace;"><span class="br0">[</span>SiteAccessSettings<span class="br0">]</span>
PathPrefix=foo
PathPrefixExclude<span class="br0">[</span><span class="br0">]</span>
PathPrefixExclude<span class="br0">[</span><span class="br0">]</span>=baz</pre>
<p>
You will need to do this for every URL for which PathPrefix should not apply.
</p>
<a name="eztoc45573_3" id="eztoc45573_3"></a><h2>External reference</h2>Tue, 09 Jan 2007 14:03:22 GMTRemoving index.php from URLs
https://ezpedia.org/solution/removing_index_php_from_urls
https://ezpedia.org/solution/removing_index_php_from_urls<a name="eztoc45563_1" id="eztoc45563_1"></a><h2>About</h2>
<p>
You will need some mod_rewrite rules set up in <a href="/en/ez/apache" target="_self">Apache</a>. Generally, these should be added to the VirtualHost configuration. A basic set looks like this:
</p>
<pre class="" style="font-family:monospace;">RewriteRule ^/var/storage/.* $<span style="">0</span> <span class="br0">[</span>L<span class="br0">]</span>
RewriteRule ^/var/<span class="br0">[</span>^/<span class="br0">]</span>+/storage/.* $<span style="">0</span> <span class="br0">[</span>L<span class="br0">]</span>
RewriteRule ^/design/<span class="br0">[</span>^/<span class="br0">]</span>+/<span class="br0">(</span>stylesheets|images|javascripts?<span class="br0">)</span>/.* $<span style="">0</span> <span class="br0">[</span>L<span class="br0">]</span>
RewriteRule ^/share/icons/.* $<span style="">0</span> <span class="br0">[</span>L<span class="br0">]</span>
RewriteRule ^/extension/<span class="br0">[</span>^/<span class="br0">]</span>+/design/<span class="br0">[</span>^/<span class="br0">]</span>+/<span class="br0">(</span>stylesheets|images|javascripts?<span class="br0">)</span>/.* $<span style="">0</span> <span class="br0">[</span>L<span class="br0">]</span>
RewriteRule .* /index.php</pre>
<p>
(Taken from Jan Borsodi's comment <a href="https://issues.ez.no/IssueView.php?Id=6053&ProjectId=3&Anchor=Comment245165" target="_self">here</a>)
</p>
<p>
Secondly, you will probably need to add the ForceVirtualHost setting in settings/override/site.ini.append.php. eZ can allegedly detect when it is installed in a virtual host setup, but it's not always correct.
</p>
<pre class="" style="font-family:monospace;"><span class="br0">[</span>SiteAccessSettings<span class="br0">]</span>
ForceVirtualHost=true</pre><a name="eztoc45563_2" id="eztoc45563_2"></a><h2>Reference</h2>
<ul>
<li>Doc: <a href="/en/ez/rewrite" target="_self">Rewrite</a></li>
<li>Forum: N/A</li>
</ul>
Tue, 09 Jan 2007 13:30:33 GMTTemplate operator to strip strings for tags
https://ezpedia.org/solution/template_operator_to_strip_strings_for_tags
https://ezpedia.org/solution/template_operator_to_strip_strings_for_tags<a name="eztoc42241_1" id="eztoc42241_1"></a><h2>Question</h2> <pre class="eztemplate" style="font-family:monospace;"><Tidemann> is there an operator that strips a string for tags?
<Tidemann> ...or removes images from an ezxml output</pre><a name="eztoc42241_2" id="eztoc42241_2"></a><h2>Solution</h2> <pre class="eztemplate" style="font-family:monospace;"><Bratt> No, but you can make one really simple
<Bratt> ...by using simpletags()
<Bratt> Set up this in template.ini: [SimpleTagsOperator], TagList_NoTags[], TagList_NoTags[text]=;;strip_tags
<Bratt> Then you can use simpletags( 'NoTags' )
<Tidemann> Bratt: hmm.. nice... haven't seen simpletags before actually
<Tidemann> Bratt: can I use the method here to enable a-tags too then? https://ez.no/community/forum/setup_design/text_block_vs_xml_block_in_forum_topic_tpl/re_text_block_vs_xml_block_q__4
<Bratt> Sure, just set it up in template.ini
<Tidemann> cool! thanx!
<kracker> wow, i wish you would write that into eZpedia ...
<Bratt> Yes, I know. Took some time before I realized how simple it could be done
<zurgutt> interesting
<Tidemann> Bratt: uhm.. TagList_NoTags[text]=;;strip_tags seems to remove everything
<Tidemann> <span style="color: #66cc66;">{</span><span style="color: #0000bb;">$child</span>.<span style="color: #006600;">data_map</span>.<span style="color: #006600;">intro</span>.<span style="color: #006600;">content</span><span style="color: #66cc66;">|</span>simpletags<span style="color: #66cc66;">(</span><span style="color: #dd0000;">'NoTags'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">}</span> <-- right?
<Bratt> Tidemann: Yes, that was the point. If you want to keep a-tags, you need to set that up in template.ini
<Bratt> Add a line something like: TagList_NoTags[text]=<a>;</a>;strip_tags
<Bratt> But I would call it something other than NoTags then
<Bratt> KeepLinks, or whatever
<Tidemann> Bratt: I didn't realise it removed the content of the tag aswell...
<Bratt> Tidemann: A tag includes the content of it :)
<Tidemann> Bratt: hehe..
</pre><a name="eztoc42241_3" id="eztoc42241_3"></a><h2>External reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/setup_design/text_block_vs_xml_block_in_forum_topic_tpl/re_text_block_vs_xml_block_q__4" target="_self">Text block vs xml block</a> </li>
</ul>
Fri, 05 Jan 2007 12:55:22 GMTHow to find object by node_id?
https://ezpedia.org/solution/how_to_find_object_by_node_id
https://ezpedia.org/solution/how_to_find_object_by_node_id<a name="eztoc40025_1" id="eztoc40025_1"></a><h2>Question</h2>
<p>
How can you 'find' an object, if all that is known is the node_id?
</p>
<a name="eztoc40025_2" id="eztoc40025_2"></a><h2>Answer</h2> <pre class="eztemplate" style="font-family:monospace;"><span style="color: #66cc66;">{</span><span style="color: #66cc66;">{</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=def&SearchContentClassID=34"><span style="color: #0600FF;">def</span></a> <span style="color: #0000bb;">$my_node</span> <span style="color: #66cc66;">=</span><a href="https://ez.no/doc/content/advancedsearch?SearchText=fetch&SearchContentClassID=31"><span style="color: #0600FF;">fetch</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'content'</span>, <span style="color: #dd0000;">'node'</span>, <a href="https://ez.no/doc/content/advancedsearch?SearchText=hash&SearchContentClassID=31"><span style="color: #0600FF;">hash</span></a><span style="color: #66cc66;">(</span> <span style="color: #dd0000;">'node_id'</span>, <span style="color: #0000bb;">$node</span>.<span style="color: #006600;">node_id</span> <span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span>
<span style="color: #0000bb;">$my_object</span><span style="color: #66cc66;">=</span><span style="color: #0000bb;">$my_node</span>.<span style="color: #006600;">object</span><span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">{</span><span style="color: #0000bb;">$my_node</span>.<span style="color: #006600;">name</span><span style="color: #66cc66;">|</span>wash<span style="color: #66cc66;">}</span></pre><a name="eztoc40025_3" id="eztoc40025_3"></a><h2>External reference</h2>
<ul>
<li>Forum: <a href="https://ez.no/community/forum/general/howto_find_object_by_node_id" target="_self">How to find object by node_id</a>?</li>
<li><i><a href="https://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/node" title="https://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/node" target="_self">https://ez.no/doc/ez_publish/techn...modules/content/fetch_functions/node</a></i></li>
<li><i><a href="https://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list" title="https://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list" target="_self">https://ez.no/doc/ez_publish/techn...modules/content/fetch_functions/list</a></i></li>
</ul>
Tue, 02 Jan 2007 12:15:10 GMTContent object published, modified and created date modification
https://ezpedia.org/solution/content_object_published_modified_and_created_date_modification
https://ezpedia.org/solution/content_object_published_modified_and_created_date_modification
<div class="object-center">
<p class="editor_motivation">
This is a <a href="/en/template/stub">Stub</a> article. Help the eZ Publish community by expanding it!
</p>
</div><a name="eztoc38665_1" id="eztoc38665_1"></a><h2>Problem</h2>
<p>
Many people want to manualy specifiy the date's visible to users and or simply set a specific publish date in the future or edit the publish date after it has been published alredy.
</p>
<a name="eztoc38665_2" id="eztoc38665_2"></a><h2>Solutions</h2>
<p>
I think there are a few solutions which may be implemented in order of complexity.
</p>
<ul>
<li>Script: PHP or SQL Update script - Alter object date of a node(s) manually.</li>
<li>Admin: Manually edit content object dates to any date.</li>
</ul>
<a name="eztoc38665_3" id="eztoc38665_3"></a><h2>External references</h2>
<ul>
<li>N/A</li>
</ul>
Mon, 01 Jan 2007 04:16:30 GMT