$content=ob_get_contents(); ob_end_clean(); /* ?g2_page=""> / page / 2 * / $ search = array ('span class = "breadcrumb @ Us','a href = ([^ <] *) class =" next "Us', 'a href = ([ ^ <] *) class = "last"Us ','a href = ([^ <] *) class = "previous"Us ','a href = ([^ <] *) class = " First "Us'); $ replace = array (" span id = \ "span-filename \" class = \ "breadcrumb", "a id = 'next-link' href = $ 1class = 'next'", " a id = 'last-link' href = $ 1class = 'last' ', "a id =' prev-link 'href = $ 1class =' ​​previous '," "a href = $ 1class =' ​​first 'id =' First-link ''); // $ content = preg_replace ($ search, $ replace, $ content, 1); function replace_dl ($ hit) {global $ g2data; $ parents = $ g2data ['theme data'] ['parents']; $ path = "http://cratoo.de/v"; for ($ i = 1; $ i <count ($ parents); $ i ++) {$ path = "/".$parents[$i]['pathComponent ']. } // $ Nav_top = str_replace ("a href", "a" // $ return = "class = 'gbBlock gc'>". $ Hit [1]. "

"; } if( $backItem ) { $return.= "\n#nav-left:hover { background: url('/gallery2/images/left.png') no-repeat center left; }"; $back_div= "

"; } if( $parent ) { $return.= "\n#nav-top:hover { background: url('/gallery2/images/top.png') no-repeat center; }"; } $return.= "\n\n#nav-image { position:absolute; top:0px; left:0px; width: 100%; height:".$height."px; ackground-color:#ffa; } #nav-left { position:absolute; top:100px; left:0px; width:50%; height: ".($height-100)."px; ackground-color:#ff5; } #nav-right { position:absolute; top:100px; left:375px; width:50%; height:".($height-100)."px; ackground-color:#dd2; } #nav-top { position:absolute; top:0px; left:0px; width: 100%; height:100px; ackground-color:yellow; } #nav-top:hover { background: url('/gallery2/images/top.png') no-repeat center; }

"; Return $ return;} # $ pattern_dl = '@ class =" gc gbBlock [^ <] *> (. *)
Us'; $ pattern_dl = '@ class = "gbBlock". {1,9} img src = "(. *)" width = "(\ d *)" height = "(\ d *)". * /> @ Us' ; $ content = preg_replace_callback ($ pattern_dl, 'replace_dl', $ content); . / * Cut date and resolution for image and move it into first / prev next / load block * / preg_match ('@ class = "date summary"> * Date:. (*) Usi ', $ Content, $ date); . preg_match ('@ class = "block-core Photo Sizes giInfo"> * Full size:. (*) Usi ', $ Content, $ res); preg_match ('@' giDescription "> (. *) @Usi',$content,$descr); $content= preg_replace('@
. * . *
Usi ',' ', $ Content); $ search = '@ next-and-load (. *) "> (. *) Usi '; $ BLOG_LINK = (strlen ($ descr [1])! = 0)? . "Blog post:" $ descr [1] "": "";. $ replace = 'next-and-last $ 1 "style =" ">'. $ BLOG_LINK." ". $ date [1]. ''. $ res [1]. '$ 2 '; $ content = preg_replace ($ search, $ replace, $ content, 1); .?. / * * Patterns to replace links on Startpage: * g2_highlightid = 123 => * / #echo strpos ($ content, "? G2_GALLERYSID ="); $ search = array (. "/ a href = \" (*) \ g2_highlightId = \ d * \ "/", "@ \ g2_GALLERYSID = * \?." @? "); $ replace = array (" a href = \ "$ 1 \" "," \ ""); $ content = preg_replace ($ search, $ replace, $ content); list ($ error, $ items) = GalleryCoreApi :: loadEntitiesById (array ($ g2data ['theme data'] ['parent'] ['id'])); #print_r ($ items [0]); list ($ error, $ ids) = GalleryCoreApi :: fetchChildDataItemIds ($ items [0]); $ js_array = ""; $ item = array (); if (count ($ ids)> 0) {list ($ error, $ item) = GalleryCoreApi :: loadEntitiesById ($ ids); foreach ($ ids as $ id) {$ js_id_array = $ id ","..; }} If (count ($ item)> 0) {foreach ($ item as $ i) {$ js_array = "'" $ i-> getPathComponent ().. "'".; }} $ Current = $ g2data ['theme data'] ['item'] ['pathComponent']; echo $ content. ' '; ?>