Jump to content

totoff

Members
  • Posts

    495
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by totoff

  1. @cwsoft interesting, thanks. Didn't know that. It's for 3.0 up. Gave up at 2.11 ...
  2. welcome cwsoft! former contao user? ever tried to provide customized content elements for your clients in contao? something that doesn't come out of the box? oh dear ... pw is a giant leap forward in this respect. finally you are free to give you clients what they want - for a reasonable rate (read: everything is doable in contao, but for what price?).
  3. Maybe it's worth to note for everybody struggling with roles and access, that templates may include other template files (advanced -> alternate template filename). Say you have all your logic in one template "page" and shortly before golive you realise you need another template for a parent page only only in order to manage access. In this case create a template "parent" without a file. Than choose "page" as template file under "alternate template filename". Done: your logic remains but you have a new layer of access control. Guess how I found this trick ...
  4. totoff

    World Cup 2014

    The worst 'team' in this world cup so far is the referees. Italy may have played well or not, the referee didn't. That's for sure imho.
  5. I did import a XML file with the new wordpress importer. As I have > 80 posts I can't correct them by hand. What leaves me clueless is that even if I set the date say to today, save the page, and then set it agin to somewhere in march the problem remains the same. @michael you posted while I was replying to Martijn. I'll give your solution a try. Sounds promising. Thanks.
  6. I would even consider a flight - at least once
  7. Many thanks for your reply Raymond, I already have setlocale(LC_ALL, "de_DE.UTF-8"); in my config.php. Sorry for not mentioning it.
  8. Hi, I'm using $date = utf8_encode(strftime('%d. %B %Y', $child->getUnformatted('date'))); to render dates from a datefield in German. If the date contains umlauts like "March" which is "März" in German it renders a weird charakter and capitalises the "Ä": <span class="date">14. März 2014</span> The admin is not localised, the entry in the datefield is: 14 March 2014 3:23 pm Any ideas? Thanks.
  9. @kongondo I award you with my personal live saver medal! I had the understanding that it has got something to do with the string being "reset" on each loop - but I would never had the idea to intialise $out outside the loop and than to iterate over it. Thanks a lot for bringing me back on track!
  10. Hello arjen and MarkC, thanks for answering. Unfortunately that doesn't work for me. It renders only one of several entries, if I replace echo with return. This is what I have now (renders first entry of the loop in the right place): function renderReferenceList() { $page = wire('page'); $pages = wire('pages'); $page = $pages->get(1065); // Referenzen $page = $page->children("limit=15, sort=-date"); foreach($page as $child) { $out = "<div class='referenceTeaser post'>"; $out .= "<h3 class='articlehead'>{$child->headline}</h3>"; $out .= "<p>" . $child->summary . "<a href='{$child->url}'><i class='more'>Referenz ansehen</i></a></p>"; $out .= "</div>"; return $out; } } I also tried function renderReferenceList() { $page = wire('page'); $pages = wire('pages'); $page = $pages->get(1065); // Referenzen $page = $page->children("limit=15, sort=-date"); foreach($page as $child) { $out = "<div class='referenceTeaser post'>"; $out .= "<h3 class='articlehead'>{$child->headline}</h3>"; $out .= "<p>" . $child->summary . "<a href='{$child->url}'><i class='more'>Referenz ansehen</i></a></p>"; $out .= "</div>"; } return $out; } But that returns only the last post ... I'm not very experienced with PHP. So if you don't mind an example how it is done right would be greatly appreciated. Thanks
  11. Hi Forum, it seems as if I have a PHP question I'm unable to answer myself. I've tried for almost three hours now but I can't find the answer, why my code isn't working as it should. This is, what's going on: I have a central _functions.inc with this function: function renderReferenceList() { $page = wire('page'); $pages = wire('pages'); $page = $pages->get(1065); $page = $page->children("limit=15, sort=-date"); foreach($page as $child) { $out = "<div class='referenceTeaser post'>"; $out .= "<h3 class='articlehead'>{$child->headline}</h3>"; $out .= "<p>" . $child->summary . "<a href='{$child->url}'><i class='more'>Referenz ansehen</i></a></p>"; $out .= "</div>"; echo $out; } } Next I have a page template with this code: <?php include_once("./_functions.inc"); /** * Referenzen template * */ if ($page->id !== 1065) { $content = $page->body; $headline = $page->headline; $sectionhead = "Projekt"; $logo = $page->widget_logo; $logo = $logo ->single_image; $sidebar = "<div class='widget'>" . "<h2 class='sectionhead'>Kunde</h2>" . "<img class='logofile' src='{$logo->url}' title='$page->title' alt='$page->title' >" . "</div>"; } else { $sectionhead = "Referenzen"; $content = renderReferenceList(); } include("./_page.inc"); And I have a _page.inc with this code: <div id="main" class="grid-66 mobile-grid-100"> <?php echo "<h1 class='sectionhead'>$sectionhead</h1>"; if($headline) echo "<h2 class='articlehead'>$headline</h2>"; echo $content; ?> </div> <!-- /#main --> The problem is: The code for the else statement is working perfectly fine, it renders all div.referenceTeaser with the appropriate content, except that it does so on top of my markup directly after the opening body tag and not - as it should - within div#main ... var_dump($content=== null); returns true but no notice. What am I doing wrong? Thanks for your help before I'm going mad about this...
  12. Good morning, got it working. I had a typo in Ralph's code. Sorry for posting.
  13. Hi Forum, I'm working on a site which implements Ryan's Blog Profil (I did import it to the site). Unfortunately nothing of the above helps me to output month names in German - no matter what I do they remain English. This is what I have in my config.php (the timezone was set by the installer: $config->timezone = 'Europe/Berlin'; setlocale(LC_TIME, "de_DE.UTF8"); I've tried Ralf's code above in my templates and the other codes in this thread - to no avail. I'm stuck. Any help is greatly appreciated. Thanks.
  14. Hi kongondo, No, I refered to my template files I set up for other purposes than the blog. Exactly, thanks for making this more clear. Super fast service!
  15. Tried it. Worked like a charm. I was joking.
  16. You could set up one just for fun. WP is a preferred one-click-solution. Go ahead, it's easy.
  17. I am a follower oft the absolute truth and use ST2 and nothing else.
  18. Hi adrian, PW is 2.4.0 I'll PM you the file. It's published content anyway. Nothing top secret. WP is 3.8.1 - updates come faster than I can keep up with
  19. Installed, wow! Amazing work. Already a first beta-testing feedback: I have templates with the word "widget" in template name. They show up in the dashboard > settings tab though they have nothing to do with the blog. And if you publish a post from the dashboard > posts tab, the posts list doesn't update (the post remains as unpublished until you refresh your browser). That could be confusing to the unexperienced.
  20. Hi adrian, let me say how much I appreciate the huge effort you put into this. Awesome work! Unfortunately I dont't have good news regarding my specific case. I get the same results as before with my client's XML-file (I did export it once again to be sure). I again have this misterious warning and categories/tags are not assigned. However, I suspect something could be wrong with the XML export. If you would like to, please PM me your XML-file an I'll be glad to test it here with my installation in question. EDIT: Sorry, I forgot the debug mode before importing. Apologies.
  21. I tried tags first but changed to tag as I thought tags might return an array.
  22. I`m trying to tag a bunch of templates via the API (I mean tagging in the admin for sorting purposes). Is that possible? Coming from this post I tried this code, but it doesn't work: $p = $templates->find("name=post|posts"); foreach($p as $pt){ $pt->tag = 'blog'; $pt->save(); } Thanks!
  23. Hi Adrian, Nico, sorry that it took a while to get back. Unfortunately I can't report that this is working completely fine for me. Here is what I did: 1st attempt Parent = Home Everything = true Append = true Import Dates = true File = blogprofile.zip Edit content = false Result = perfect Trying to import WP-Data Everything = true Parent = Blog Append = true Import Dates = true Edit content = false Warning: Unknown Selector operator: '=%' -- was your selector value properly escaped? Result = Import successful, no tags/categories assigned, post dates as of today. Page tree as before 2nd Attempt Remove fields tags and categories from template post deleted the fields Parent = Blog Import everything = true Replace = true Import Dates = true Import-file = WP File Edit content = false Warning: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'c2-a719-1108' for key ‚name_parent_id' Result = Blog posts are present but can’t be edited in the admin. Warning : Unknown Selector operator: '' -- was your selector value properly escaped? 3rd Attempt Rollback installation to clean state from 1st attempt Repeat import blogprofile.zip from attempt 1 Result = perfect ​ Import WP-Data Everything = true Parent = Blog Replace = true Import Dates = true Edit content = false Warning: Unknown Selector operator: '=%' -- was your selector value properly escaped? Result = Import successful, no tags/categories assigned, post dates as of today (like with 1st attempt) Before testing I installed the last versions of your modules.
  24. Hi Jens, as far as I know a user must have "edit" rights to add subpages. But you may set the parent page (category?) to "locked" in order to prevent editing while it is still possible to add subpages. But maybe a more experienced user knows better.
×
×
  • Create New...