how got my ethernet disk interface access back

fancy stuff to do with an lacie ethernet neil poulton disk 500gb item

network space

And i just wanted to reset the admin password of the lacie web interface due to froob-style loss. for those seeking a quick answer for that:

  • turn OFF your ethernet disk (if it’s running now). after the light stopped flashing…
  • turn it ON again for around 2-3 secs and…
  • turn if OFF again and prepare to…
  • turn it ON immediately. Now the blue light is flashing frenzy and you’re about to be able to log into the interface with admin/admin

You see, no need to be a geek to gain access to an ethernet disk standing around ^^

update current list of available plugins from TER

one step closer to TYPO3 backend convenience

scheduled update of the extension list from the TYPO3 extension repository (TER). the extension needed has the cryptic key rscliem and will provide command line interface function for extension manager operations. just import and install it.

If you have no BE-user named _cli_lowlevel go and create it. That one’s needed to run PHP CLI commands.

test the cliKey ‘emtools’

/var/www/my-t3site/typo3/cli_dispatch.phpsh emtools --update-extensionlist

It will return a fancy array containing a message like
[0] => <p>The extension list has not changed remotely, it has thus not been fetched.</p>

(at least if you run the command successfully a second time)

To have the Extension List updated twice a day, a small entry in the current cron tab comes in handy:

# m h  dom mon dow   command
00   */12    *     *     *  /var/www/my-t3site/typo3/cli_dispatch.phpsh emtools --update-extensionlist
MAILTO="adminmail@mydomain.com"

The following options can be used:

  • –update-mirrors
    Updates mirror list from typo3.org
  • –update-extensionlist
    Retrieves current extensionlist from selected mirror and load into database
  • –check-extensions
    Checks currently installed extension for newer versions
  • –import-updates
    Imports updates for all extension, found with –check-extensions.

(taken from the README file found in typo3conf/ext/rscliem/)

You see, you can possibly automate the extension update process. I currently can’t use this feature because some extensions would break the TYPO3 instance in question if updated to newest version.

But the handy part is to have the list of extensions to update emailed to me.A connection of the updated extension list and the extension chack makes most sense.

./cli_dispatch.phpsh emtools --update-extensionlist && ./cli_dispatch.phpsh emtools --check-extensions

typoscript condition with constants

small snippet great effect to your typoscript. i use this to spare lines of executed typoscript if the editor won’t use it anyways. in my opinion it’s not only a great tool for extension development, but also it can restructure parts of your ts setup of the site.

constants:

SHOWBADGE = 1

setup:


# only work out stuff for SHOWBADGE is true

[globalVar = LIT:1 = {$SHOWBADGE}]

page.10.marks.A < lib.showBadge
# etc...
[global]

i don’t know what the LIT:1 means, but it works. i mean, is there a LIT:2 and so on? if you’ve got crucial information on this matter, comment or mail me. thanks.

additional philosophy: what are constant conditions anyway?

search and replace mysql

simple to do if you know how it’s done. and instead of searching the web, i’ll stick to my own note from now on :)

UPDATE tablename SET fieldname = REPLACE(fieldname,'searchpattern','replacement');

quite useful for batch changes i.e. paths to images that have changed… ;)

it is of importance to not use ” on tablename or the fieldname.

to narrow it down to a special page (like in Backend jobs for TYPO3)

UPDATE tt_content SET bodytext = REPLACE(bodytext, 'http://bigbabou.org', 'https://bigbabou.org') WHERE pid=2501;

that will change every link from http:// to https:// in any content element on page 2501. you could break it down even further to only change CType=’HTML’ (speaking, content elements of type HTML).
easy to apply but nice to have it to copy from…

list all TypoScript lines

some days ago i needed to have a complete listing of the TypoScript Constants and Setup that affect a specified page. sure, the good template-analyzer highlights the lines of a single ts template found in the rootline. but how do you display the complete TypoScript that applies to this page?

TYPO3 Template Analyzer

maybe the dirty copy/paste trick works out for smaller sites, but if the hierarchy is getting more complex you definitely don´t want to go this extra miles. so, i started my own extension to present this function. after a short while digging into the template analyzer code from kasper i was surprised as he already built in this feature of a complete listing.

complete ts listing using onboard functions

your http request to view a single template with the template analyzer looks like

http://t3/typo3/sysext/tstemplate/ts/
/index.php?id=42&template=sys_23

…or at least a bit like that. Now, if you fire up a request like this

http://t3/typo3/sysext/tstemplate/ts/
/index.php?id=42&template=all

…you´ll get what you want. It can be easy like this.

To spare you the typing by hand, you could touch the systext itself.  Add the following lines in typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php i.e. around line 122 (after the section “Template Hierarchy” is set up).

 	$completeLink= '&lt;p&gt;&lt;a href=&amp;amp;quot;index.php?id='.$GLOBALS['SOBE']-&gt;id.'&amp;amp;amp;template=all&amp;amp;quot;&gt;view the complete TS Listing&lt;/a&gt;&lt;/p&gt;';
$theOutput.=$this-&gt;pObj-&gt;doc-&gt;spacer(5);
$theOutput.=$this-&gt;pObj-&gt;doc-&gt;section(&amp;amp;quot;Complete TS:&amp;amp;quot;,$completeLink,0,1); 

Then visit the Template Analyzer again and click the button. Get yourself some cool or hot drink as the ts parser now works out all the TypoScript lines you asked for what could take a while.

That snippet especially comes in handy when administrating foreign pages that have not been setup by you and the object browser keeps spitting error at line xxxx in your backend.

As for me, this makes my weekend. I still wonder why this feature is not visible for the user (security/performance issues? or just forgot?) or maybe i even was too stupid to find the button. But i like this feature and the experience that the system can do even more as the gui presents me ^^

please drop a comment if you know about these concerns. See you on monday.

show author of the page if set per typoscript

just because this is a common case, i’ll post it for my own and public concern. this is the task:

show a text to contact the author of a page by (spamprotected) email if information to the author is found in the page object


temp.contact = COA
temp.contact {
50 = TEXT
50 {
value = {page:author}
insertData = 1
required = 1
typolink.title.dataWrap = {page:author}
typolink.parameter.dataWrap = {page:author_email}
noTrimWrap = |<div class="authorinfo">Could this page be improved? <br />(Pagetitle: {page:title})<br /><br />Please write to |</div>|
}
}

suppress listing of static_tables in the root page

if you’re about to work with the root page of some TYPO3 installation and, let’s say you have static_tables installed, you’re gonna get a long list of countries, markets and currencies in the root list which is fully loaded, everytime you want to administrate a backend user or a file mount – since these items are listed by default on the root page. i kinda got used to this.

but since this sucks a lot of time up in your backend session depending on server load and bandwidth, this one-liner found on the english TYPO3 mailing list can tweak your backend experience for the root page. the attempt of putting the line like “mod.web_list.static_template.hideTable = 1” into a pageTS will not work because the root page seems to have no pageTS at all.

instead, put this in the userTS of your be account  or a user group you’re member of:

mod.web_list.hideTables=static_countries,static_country_zones,static_currencies,static_languages,static_territories,static_taxes,static_markets
mod.web_list.hideTables=static_template

the tables you specify here will be gone on every page. in the case of static_* tables, they’re just to listed on the root page, anyway. so, listing your root page will speed up a lot!

alphabetical order of fe_groups in the access dialog of TYPO3 pages

here’s some useful snippet to control the size and the order of the access groups of a page.

access user group list

standard size of the page access list

access user group listwhen working with larger TYPO3 sites, the access groups can become increasingly complex. the list view to select the groups from is about only five elements long by default, but that maybe a bit too short when it comes to more than 200 user groups out of i.e. an ldap structure.

this makes selecting the right group painful, especially when this list is not ordered by natural alphabetical order but by id or other fancy computer data.

// more space to select fe_groups
$TCA['pages']['columns']['fe_group']['config']['size'] = 12;
$TCA['pages']['columns']['fe_group']['config']['foreign_table_where'] = 'ORDER BY fe_groups.title';

$TCA['be_users']['columns']['usergroup']['config']['size'] = 12;
$TCA['be_users']['columns']['usergroup']['config']['foreign_table_where'] = 'ORDER BY be_groups.title';

Add this code to your extTables.php file and things get smoother again. The last two lines apply the same for the backend user dialog with the backend user selection.