Can
Members-
Posts
350 -
Joined
-
Last visited
Everything posted by Can
-
Made a little external link click counter based on this..so thanks guys the link template got this code if(!$user->isSuperuser() && !$user->hasRole('admin')) { $page->of(false); $page->count += 1; $page->save(); } $session->redirect($page->link); so in link-category template I'm linking to $child->url and not the link url works great..love processwire!!
-
Great to hear Wanze. I'll await this with joy Do you already have a possible release date? Cheers hmm..it's working quite okay as I said, but seems to only work for pages under a specific parent got one other page where I want to prove PDF version..it uses the same template and I'm not checking for this parent or something so there shouldn't be any exclusion the PDF is getting created but only with header and footer without content..hmm :/ strange..I'm just posting this because maybe someone else could need the hint solved pdf not working for certain page by duplicating the page via core page clone module and voila it's working without any other changes or creating the page from scratch again
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Can replied to ryan's topic in Modules/Plugins
It´s me again..don't want to be annoying but I could need a little hint for my course(event) table. my actual working events template looks like this $mo = $di = $mi = $do = $fr = $sa = $mo1 = $di1 = $mi1 = $do1 = $fr1 = $sa1 = $mo2 = $di2 = $mi2 = $do2 = $fr2 = $sa2 = $moclass = $diclass = $miclass = $doclass = $frclass = $saclass = $mo1class = $di1class = $mi1class = $do1class = $fr1class = $sa1class = $mo2class = $di2class = $mi2class = $do2class = $fr2class = $sa2class = ''; foreach($page->events->sort('time') as $a) { //->sort('-time') $time = date('G',strtotime($a->time)); $day = strftime('%A', strtotime($a->date)); $datestart = date('d.m.', strtotime($a->date)); $dateend = date('d.m.', strtotime($a->dateend)); ($time > 8 && $time <= 12 && $day == 'Montag') ? $mo .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $mo .= ''; ($time > 8 && $time <= 12 && $day == 'Dienstag') ? $di .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $di .= ''; ($time > 8 && $time <= 12 && $day == 'Mittwoch') ? $mi .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $mi .= ''; ($time > 8 && $time <= 12 && $day == 'Donnerstag') ? $do .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $do .= ''; ($time > 8 && $time <= 12 && $day == 'Freitag') ? $fr .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $fr .= ''; ($time > 8 && $time <= 12 && ($day == 'Samstag' || $day == 'Sonntag')) ? $sa .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $sa .= ''; ($time > 12 && $time < 19 && $day == 'Montag') ? $mo1 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $mo1 .= ''; ($time > 12 && $time < 19 && $day == 'Dienstag') ? $di1 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $di1 .= ''; ($time > 12 && $time < 19 && $day == 'Mittwoch') ? $mi1 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $mi1 .= ''; ($time > 12 && $time < 19 && $day == 'Donnerstag') ? $do1 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $do1 .= ''; ($time > 12 && $time < 19 && $day == 'Freitag') ? $fr1 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $fr1 .= ''; ($time > 12 && $time < 19 && ($day == 'Samstag' || $day == 'Sonntag')) ? $sa1 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $sa1 .= ''; ($time >= 19 && $day == 'Montag') ? $mo2 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $mo2 .= ''; ($time >= 19 && $day == 'Dienstag') ? $di2 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $di2 .= ''; ($time >= 19 && $day == 'Mittwoch') ? $mi2 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $mi2 .= ''; ($time >= 19 && $day == 'Donnerstag') ? $do2 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $do2 .= ''; ($time >= 19 && $day == 'Freitag') ? $fr2 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $fr2 .= ''; ($time >= 19 && ($day == 'Samstag' || $day == 'Sonntag')) ? $sa2 .= "<li class='{$a->color}'><strong><u>{$a->time} - {$a->timeend}</u><br>{$a->shorty}<br>{$a->descr}</strong><br>mit {$a->teacher}<br>{$datestart}- {$dateend}<br>{$a->count} mal<br><strong>{$a->notes}</strong></li>" : $sa2 .= ''; } $content .= <<< _EVENTS <table class="events-table table-bordered width-100"><thead><th>Montag</th><th>Dienstag</th> <th>Mittwoch</th><th>Donnerstag</th><th>Freitag</th><th>Samstag/Sonntag</th></thead> <tbody><tr><td><ul>$mo</ul></td><td><ul>$di</ul></td><td><ul>$mi</ul></td><td><ul>$do</ul></td><td><ul>$fr</ul></td><td><ul>$sa</ul></td></tr> <tr><td><ul>$mo1</ul></td><td><ul>$di1</ul></td><td><ul>$mi1</ul></td><td><ul>$do1</ul></td><td><ul>$fr1</ul></td><td><ul>$sa1</ul></td></tr> <tr><td><ul>$mo2</ul></td><td><ul>$di2</ul></td><td><ul>$mi2</ul></td><td><ul>$do2</ul></td><td><ul>$fr2</ul></td><td><ul>$sa2</ul></td></tr> </tbody></table> _EVENTS; Maybe looks a bit messy with all those shorthand code My problem is that it's too "static" I would love to have it more dynamic so every event gets it's own <td> cell instead of a <li> within a cell Soo I digged literally through the whole web but couldn´t figure it out. After a little hint from a friend I thought I got it..it's drawing the table quite nice but every event get's it's own row even if both are within same time range and one is on tuesday the other on thursday..so both could be in the first row Now I think thats due to wrong sorting. The events are sorted by date (which is beginning of the event) in admin. but while iterating through the events in the template the events are unordered event with foreach($page->events->sort('date') or -date Then I figured out that the get only sorted by day (got the german format d.m.Y though) so the 3.06.2014 comes before 14.04.2014 My newer code looks like this $i = 1; $days = array('Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag/Sonntag'); $content .= "<table><thead><tr>"; foreach($days as $d) $content .= "<th>$d</th>"; $content .= "</tr></thead><tbody>"; foreach($page->events->sort('-time') as $e) { $time = date('G',strtotime($e->time)); $day = strftime('%A', strtotime($e->date)); $datestart = date('d.m.', strtotime($e->date)); $dateend = date('d.m.', strtotime($e->dateend)); if($i % 6 == 1) $content .= "<tr>"; if($time > 8 && $time <= 12) { foreach($days as $d) { if($d == $day) { $content .= "<td>{$e->date}-{$day}-{$e->time}<strong>{$e->sort}</strong></td>"; } else { $content .= "<td></td>"; } $i++; } } if($i % 6 == 1) $content .= "</tr>"; } $content .= "</tbody></table>"; It's just a little stripped, the full code got 3 of those if($time > 8 && $time <= 12) with different time ranges of course Just noticed that the sorting is not the the only reason, the events get own rows anyways but I don't know why?! Hope could explain myself properly enough. Hopefully someone could throw a little hint on this. By the way, haven't figured out why I needed to disable if("$events" != "$this->value" || $numDeleted) as mentioned to get editable events but it´s working quite nice right now so it's not really important.. UPDATE: okay, got the sorting working. changed the time fields so they save input as unix timestamp like date field so it's better sortable Still don't get more than 1 event in the same row :/ -
Great work Wanze, thanks for this module!! Everything works fine after figuring out what works in pdf files and what not^^ One thing I noticed, is that the "page orientation" in the module settings is getting saved but the value in the field switchs back to P so I have to reset this everytime when I change some values. Cheers Can
-
same cropping issue
-
PW 2.4.0 with params you mean this "vorschau-bild,150,150" ? it seems to be with all images..all jpg but it´s working as it should in two other installations even with same params by the way the hover preview is working at the moment..oh..seems to work after page save so when uploading an image the hover preview is almost hidden like overflow:hidden..it's working after saving the page again..tried it several times with same behaviour but cropping is still not working in one PW installation..no JS errors in chrome dev tools..
-
Howdy people got 2 things with thumbnails module 1. Sometimes the little hover preview is hidden the screenshot is from Chrome, sometimes it´s working most time not, gave Firefox a chance and it worked..but tested only twice.. 2. The manual cropping is doing strange things look at the draggable, it´s showing a "copy" of the image instead of being transparent. Next look at the preview..it´s cut..half of the image is missing..looks like I´m out of image with the overlay In the end it´s working fine..but it´s irritating and not really nice for the later admins..they´re not really computer cracks ^^ hope I overlooked a solution
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Can replied to ryan's topic in Modules/Plugins
Hello everybody hope it´s okay to start a new post, thought the other one is quite old already?! I rearranged my head and came to a slightly different solution.. Started my customized Events Fieldtype from scratch and almost everything works fine now. Couple of minutes ago it killed all my entries where I don´t really understand why, but I think changing this $count = $this->sanitizer->entities($event->count); to this $count = $event->count > 0 ? $this->sanitizer->entities($event->count) : ''; hopefully did the trick, because it´s an integer field. Wasn´t deleting my entries since then.. I´m not 100% happy with date and time pickers because enddate/-time should change based on startdate/-time, but that´s not important..maybe I´ll change them anyway?! One main thing still not working is editing existing events, maybe someone is willing to throw an eye on the code or has an idea what it could be. Can Maybe I find time and mood to get into github when finished this project UPDATE: Same as before, commenting out if("$events" != "$this->value" || $numDeleted) { as adrian mentioned helps for the moment but I would like to understand what I´m doing wrong and how I could improve this FieldtypeEvents.zip -
Module Stable version: The ACE Editor, your new favorite Inputfield
Can replied to Adam Kiss's topic in Modules/Plugins
like it! added $(function() { $( ".ace-editor-position-wrapper .ace_scroller" ).resizable({ alsoResize: ".ace-editor-design-wrapper", minWidth: 1145, maxWidth: 1145 }); }); at the very end of InputfieldAceEditor.js Is there a way adding buttons to the editor especially the pwimage button like in tinymce? I know, ace doesn´t handle inline images in editor but how about just inserting the html/mardown/textile for the selected image? cheers Can PS: it´s working in 2.4 as well -
nice consesus folks haha..just had the same idea couple of days ago and hacked something together it could get some improvements but it´s working quite nice as it is nobody has to enhance this one for me..only if fun or own use just wanted to share my implementation of this idea ah maybe nicer to mention what´s going on in short it´s not only about storing search terms but giving the possibility to provide alternative spellings as well (not automated though) so my search.php is checking if the search term matches an alternative spelling, if yes it´s creating the needed selector if no create the "normal" selector (now I´m thinking it could be better to change those, so every search is a default one first and if this one not matches it´s trying to get an alternative spelling, maybe it´s a little faster?!) then it´s spitting out the results if search term not yet present as page..it´s creating one with a little counter which of course gets incremented when already present (I´m outputting those in the admin dashboard and thinking about a little button and pageselect next to each misspelled word which would save it as alternative spelling the alternative spellings are just a title and a body and you need to add words manually right now if no results or results < 3 (could merge them) or no search term at all it´s appending a little sitemap as alternative at at the end the search form (a little one is already in the head) if($q = $sanitizer->selectorValue($input->get->q)) { $input->whitelist('q', $q); $alternative = $pages->get("parent=5756, search_keywords%=\"$q\"")->title; if(count($alternative)) { $countSelect = "title|body%=$alternative, id!=27|5724|5756|5760, template!=search-keywords|search-alternatives"; $resultsSelect = "title|body%=$alternative, id!=27|5724|5756|5760, template!=search-keywords|search-alternatives, limit=50"; } else { $countSelect = "title|body%=$q, id!=27|5724|5756|5760, template!=search-keywords|search-alternatives"; $resultsSelect = "title|body%=$q, id!=27|5724|5756|5760, template!=search-keywords|search-alternatives, limit=50"; } $count = count($pages->find("$countSelect")); $results = $pages->find("$resultsSelect"); if($alternative) { $content .= "<p>No results for <strong>\"$q\"</strong><br> Instead we found $count matches for <strong>\"$alternative\"</strong>.</p>"; } elseif($count === 0) { $content .= "<p>No results for \"$q\"</p>"; } else { $content .= "<p>$count matches for \"$q\"</p>"; } if($count) { $content .= "<ul>"; foreach($results as $r) $content .= "<li><a href='$r->url'><strong>$r->title - $r->headline</strong></a><p>" . wordLimiter($r->body,20,'...') . "</p></li>"; $content .= "</ul>"; $content .= "<div class='row'>" . $results->renderPager(array( 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'listMarkup' => "<ul class='pagination six centered text-centered'>{out}</ul>", 'itemMarkup' => "<li class='{class}'>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>", 'currentItemClass' => "active", 'currentLinkMarkup' => "<span>{out}</span>" )) . "</div>"; } // Save Keyword as Page or Increase when already exists $keyword = $pages->get("template=search-keywords, title=$q"); if(!$keyword->id) { $p = new Page(); $p->parent = $pages->get("5760"); // /suche/liste-der-suchbegriffe/ $p->template = 'search-keywords'; $p->title = $q; //$input->whitelist('q', $q); //date("d.m.Y - G:i:s"); $p->name = $q; $p->save(); $p->of(false); $p->search_keyword_count = 1; $p->save(); } else { $keyword->of(false); $keyword->search_keyword_count = $keyword->search_keyword_count + 1; $keyword->save(); } } if($count === 0 || $count < 3 || !$q) { $content .= "<p>Sitemap</p>"; $content .= "<ul>"; foreach($pages->find("template!=admin, has_parent!=2, id!=27|5724 include=all") as $page) { $content .= "<li><a href='$page->url'><strong>$page->title - $page->headline</strong></a><br>". wordLimiter($page->body,20,'...') ."</li>"; } $content .= "</ul>"; $content .= "<p>Or try a search.</p>"; } $content .= "<div class='row'><div class='seven columns centered'>" . renderSearchForm() . "</div></div>"; hardcoded the messages in german, so it´s just a quick translate to make clear what it´s saying cheers PS: what about srollable code blocks in here? Update: Simplified the selector <?php $templates = "template=home|basic-page|course|courses|workshop|workshops|album|gallery|link-category|links|teacher|teachers"; $limit = "limit=15"; $alternative = $pages->get("parent=5756, search_keywords%=\"$q\"")->title; if($alternative) $selector = "title|headline|body%=$alternative, id!=27|5724|5756|5760, $templates, $limit"; else $selector = "title|headline|body%=$q, id!=27|5724|5756|5760, $templates, $limit"; $results = $pages->find("$selector"); $count = $results->getTotal(); Only one $pages->find and. Tried to combine the $selector but "title|headline|body%=$alternative|$q wasn't working, got wrong results Could at least combine the exclusion..but I'm busy with another project right now
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Can replied to ryan's topic in Modules/Plugins
gave PageTable a quick try..commented module requirement out cause I´m still on 2.4.0 but seems to not working in the end.. it´s creating the page..but displaying strange stuff after saving and not showing the created page in the appropriate table so..how "stable" is the actual dev state? cause the page could maybe switch to productive in the next couple days but my brain thinks it figured out, that pagetable is not really a difference to repeater..so maybe I´ll give them another chance thank you adrian works better right now..only checkboxes are still not working..maybe I can figure this out myself with your little hint about the checked state thanks -
really nice work found two things while on Samsung Galaxy Nexus stock browser http://ciaraphelan.com/ the first load gave me this after realoading all seemed to be fine and on food-club.com cheers and go on
- 16 replies
-
- ben byford
- showcase
-
(and 1 more)
Tagged with:
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Can replied to ryan's topic in Modules/Plugins
Aaaaahaaa!!! this sounds really interesting..will give it a try. But now it´s time for a tv series and bed, almost 11pm in spain now good night -
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Can replied to ryan's topic in Modules/Plugins
Thanks for your quick reply apeisa. I know ProFields and I really like them, especially the Table fieldtype and would really love to support PW. The thing is that I´m not really into money at the moment and it´s more like a trade. I know the customer a long time know and they are paying a domain and webspace for a private project Maybe I could get the ProFields a bit later..but I need this one first. You mean page fieldtype right? Don´t really know how to achieve it with this one? Maybe you have a hint on this for me In the "create new page" from the page field its only possible to set the title of multiple pages right, so they then need to go to those pages and add all other informations? But maybe I´m missing something -
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Can replied to ryan's topic in Modules/Plugins
Hello people I need a customized version of this nice module. Repeaters are, as far as I came, not the right one for this. My customers, not really into computer and web things, have a courses calendar for their yoga school. Each course, has a start and end date. In this time the course will be at different days and different times, that´s the point where I couldn´t get repeaters like I think it´s easiest. Don´t want to have separate pages for each course, as long as it´s not absolutely necessary.. I was a bit afraid about tweaking events fieldtype because I´m not really a programmer, but because I didn´t saw another way I faced my fear haha It´s not properly styled right now, but it´s almost working. Biggest thing right now is that the dateend field is not saving at all. So I´m writing in hope that someone can help me a little with this one and maybe has some tips because I could imagine there are better ways to achieve this. I guess it´s because of the same field names, so I probably handle the storage process a little different? At the end I will add a jquery timepicker. If it´s not possible or usefull to have start and end time in one field, I could split them of course, but that´s for later, when I figured out how to save the data properly. Ah the data will be filled in this calendar Cheers Can FieldtypeCourses.zip -
shared modules like drupals "all" folder would be awesome (it´s bit ago since my last drupal site?!) but as I remember you can have different sites with different databases like PW but every module/theme you put in "all" folder will be accessible from every site so you can save diskspace and so on shared admin could be interesting as well but probably a little specific as teppo mentioned
-
aha interesting..having even a single product as variation.. I´m trying to figure out which way I like more either no repeater for no variations or the way you described it..thanks for the hint I guess child pages could be great for larger variations where they each have images etc..
-
I´m handling variations with child items at the moment but I think will change it to repeaters because only a few products will have variations as I know now so it would be a little overhead ProcessWire is really awesome! It´s kind of fun changing structure while developing and note handling it a little different would be more logic
-
Got it working myself with this one $updated = 0; foreach($order->order_items as $item) { if ($item->order_product == $form_addtocart[item]) { $item->of(false); $item->order_qty += $form_addtocart[qty]; $item->save(); $updated = 1; break; } } if($updated === 0){ $order->of(false); $order_items = $order->order_items->getNew(); $order_items->order_qty = $form_addtocart[qty]; $order_items->order_product = $form_addtocart[item]; $order_items->save(); $order->save(); } Why not editing my post or marking as solved? Hope to get some improvement tips, if there are any (what I guess). I´m studious
-
that´s what I meant with:
-
bwakad isn't the thing with the _init.php and _out.php like in the skyscrapers profile like what you mentioned? think it's exactly what you are talking about and I like the way as well it doesn't really matter if the styles are producing a request or not when caching is enabled right? so no matter if I use my script or AIOM at the end..
-
Thanks Martijn! Thought about caching too, but then I don´t save the request anymore. Or maybe I could use markup cache or just cache the whole template right? I´m problaby totally wrong on this, but at least it was a little php exercise for me..digging more into functions and working with files a little ;-)
-
I think this thread fits my question as well I´ve talked to david-karich and he told me that it´s probably better to have inline styles, at least for above-the-fold content So I thought about having the whole stylesheet in the head like ages before, but get it included and minified to still have structured code for maintenance Wrote a little function function minCSS($styles) { foreach($styles as $style) { $buffer .= file_get_contents($style); } $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); $buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); $buffer = str_replace(': ', ':', $buffer); $buffer = str_replace(' {', '{', $buffer); $buffer = str_replace('{ ', '{', $buffer); $buffer = str_replace(';}', '}', $buffer); $buffer = str_replace('; ', ';', $buffer); $buffer = str_replace(', ', ',', $buffer); $buffer = str_replace(' + ', '+', $buffer); $buffer = str_replace(' > ', '>', $buffer); $buffer = str_replace("url('../", "url('/site/templates/", $buffer); $out = "<style type='text/css'>"; $out .= $buffer; $out .= "</style>"; return $out; } now I can echo minCSS(array('styles/style1.css', 'styles/style2.css', 'styles/style3.css')); is it worth saving this request?
-
interesting idea really nice and I like the clean and simple design thought immediately about making the same for southern spain as well hehe but I got enough to do at the moment cheers
-
hmm..an example would be interesting thought about importing from csv into different fields as adrian mentioned but when those texts are only in illustrator?! I have no idea how to get them out there as plain text? anyway..when you say this is not the way to go...