Skip to content

Instantly share code, notes, and snippets.

View kathangeorg's full-sized avatar

Schorsch kathangeorg

View GitHub Profile
@kathangeorg
kathangeorg / gist:3734253
Created September 16, 2012 20:27
FLUX Bug after Page Copy
###########
WORKING below
##########
## DO NOT ##
UPDATE tt_content
SET tx_flux_parent = SUBSTRING(tx_flux_column, INSTR(tx_flux_column, ':') + 1)
WHERE tx_flux_column != "" AND tx_flux_column IS NOT NULL AND tx_flux_parent IS NULL AND uid = 27
#######################
@kathangeorg
kathangeorg / gist:3787040
Created September 26, 2012 09:37
bash zip download
if ( $_POST['action'] == 'save' ) {
if ( isset( $_POST['save_pdf'] ) ) {
foreach ( $_POST['save_pdf'] as $save_idart ) {
generate_pdf_file ( $save_idart, $save_to_disc=true );
}
//***
set_time_limit(1800); // run max for 30min
$debug = true;
if ( $_POST['action'] == 'save' ) {
@kathangeorg
kathangeorg / gist:3787079
Created September 26, 2012 09:49
Typo3 copy not hidden
## into Page TS
TCEMAIN.table.pages {
disablePrependAtCopy = 1
disableHideAtCopy = 1
}
TCEMAIN.table.tt_content {
disablePrependAtCopy = 1
disableHideAtCopy = 1
@kathangeorg
kathangeorg / gist:3951987
Created October 25, 2012 10:52
contenido UTF8 Server MYSQL
// in die conlib/db_mysql.inc
/* public: connection management */
function connect($Database = "", $Host = "", $User = "", $Password = "") {
/* Handle defaults */
if ("" == $Database)
$Database = $this->Database;
if ("" == $Host)
$Host = $this->Host;
@kathangeorg
kathangeorg / gist:3951989
Created October 25, 2012 10:53
Contenido UTF8 Server MYSQL Umlaute
// in die conlib/db_mysql.inc
/* public: connection management */
function connect($Database = "", $Host = "", $User = "", $Password = "") {
/* Handle defaults */
if ("" == $Database)
$Database = $this->Database;
if ("" == $Host)
$Host = $this->Host;
@kathangeorg
kathangeorg / gist:3952253
Created October 25, 2012 12:14
Shell chmod Files Or Folders
find Verz -type d -print0 | xargs -0 chmod 750
find Verz -type f -print0 | xargs -0 chmod 640
@kathangeorg
kathangeorg / gist:4079941
Created November 15, 2012 17:27
bash mysql mysqldump charset
mysqldump --default-character-set=utf8 -udb58799_xxx -pxxxxxxxxxx -hmysql5.xxxxxx.de db58799_xxx > db58799_xxx_1211_v2.sql
mysql --default-character-set=utf8 -udb58799_xxx -pxxxxxxxxxx -hmysql5.xxxxxx.de db58799_xxx < db58799_xxx_1211_v2.sql
@kathangeorg
kathangeorg / tt_news SETUP
Created April 24, 2013 16:01
TYPO3 SETUP for tt_news
##############################
## tt_news ###################
plugin.tt_news {
# Pagebrowser konfigurieren
usePiBasePagebrowser = 1
pageBrowser {
#maxPages = 5
#tableParams = 0
showPBrowserText = 0
showFirstLast = 1
@kathangeorg
kathangeorg / bash.sh
Last active December 18, 2015 10:09
Bash: Escape Single Quotes ' #bash #escape #single quote
Strong quoting
Strong quoting is very easy to explain:
Inside a single-quoted string nothing(!!!!) is interpreted, except the single-quote that closes the quoting.
echo 'Your PATH is: $PATH'
That $PATH won't be expanded, it's interpreted as normal ordinary text, because it's surrounded by strong quotes.
In practise that means, to produce a text like Here's my test… as a single-quoted string, you have to leave and re-enter the single-quoting to get the character "'" as literal text:
@kathangeorg
kathangeorg / TYPO3 FED thumbs.php BUG
Last active December 20, 2015 23:08
TYPO3 FED thumbs.php Bug: Images are not shown in backend if there is an ' ' on the beginning of thumbs.php at rendering an image -> in my case warnings from FED made ' ' at the beginning
It's not only RealURL's problem - although it's most common while users are manipulating this file manually to add custom rules. Anyway this problem also ocures with typo3conf/localconf.php.
How to confirm:
Right click on the broken image and choose Open image in new window it will open a file with address like: http://somedomain.tld/typo3/thumbs.php?&file=..%2Fuploads%2...etc use some browser to preview the source code ie. in Chrome prepend the address with view-source: like: view-source:http://somedomain.tld/typo3/thumbs.php?&file=...etc. There should not be any whitespaces before the code of image...
How to prevent?
As you wrote. Check your config files like realurl_conf.php or localconf.php and make sure that there are no spaces before <?php. In case of script ending.... just remove the ?> tag, so script will end automatically without white spaces (even if you'll add 100 empty lines after last line of code), unfortunately sometimes finding this one annoying space in configs takes hours, so....