Jump to content

kongondo

PW-Moderators
  • Posts

    7,379
  • Joined

  • Last visited

  • Days Won

    139

Everything posted by kongondo

  1. Notepad++ anyone? I don't know if it counts as an IDE but it works fine for me with its plethora of plugins although I may need something more IDE-ish in the future...
  2. Horst, Thanks for the comprehensive post! I'll write a better reply later on... data-src: data-* where * is an attribute is a HTML5 custom data attribute element. See also here and here. So, in this case, data-src is a url. Used this as it came with the audio.js example I didn't know about streamurl so was directly accessing the file . I look forward to experimenting with those frontendhandlers. More later!
  3. I don't think you can do it like that. A template must first be assigned before saving the page. See here. $skyscraper = new Page(); $skyscraper->template = $templates->get("skyscraper"); $skyscraper->parent = $pages->get("/cities/atlanta/"); $skyscraper->title = "W-Hotel Tower"; $skyscraper->height = 400; $skyscraper->year = 2009; $skyscraper->body = "This is a nice hotel and it has a helicopter landing pad on top of it."; $skyscraper->save(); Unless, I misunderstand you..
  4. I think he is trying to create two pages, one manually, the other dynamically after the first one. How I understand it is that: Creating a new page memberX under the folder called member should trigger the creation of a page userX under the folder user. Edit: Maybe I am the one confused Since users, roles, etc in PW are also pages, the term "user" page can mean a new user? nway, will let onjegolders explain
  5. Hi Michael. Welcome to PW! The following should work. Doing this in a hurry. There are other ways to do this...this is just one of them // grab and output a random image from the child page with ID 123 $image = $pages->get(123)->images->getRandom(); if($image) echo "<img src='$image->url'>"; See this page for more details on images... OK, am late in my reply Edit: Plus just seen you want images from any child pages; apologies. Will leave this response here though
  6. Been having fun with this! Here's the output..A frontend demo of Horst's Local Audio Module...It's been fun playing with PW selectors and variables. First, I'd like to thank all the forum folks who've helped answer my API questions - Teppo, Soma, Diogo, Nik, etc....you know, the usual suspects.... Thanks to AnotherAndrew for this post. It led me to the nice jQuery plugin, Filtrify. Horst, big thanks for the module.! It's been a massive learning process for me besides having fun (and at times frustration ! ) along the way. There were times I went round in circles only to realise I was making simple things difficult; this is PW, the solutions are usually simple! Most of the theme is based on Filtrify's demo so all credits to Luis Almeida. Of course I won't be releasing his theme; this is just a demo (unless of course there are no restrictions). I think what I enjoyed most was the logic behind PW and how I could apply that to the demo [being a newbie and all!]. More than getting a solution I like the reasoning that comes before a solution, the journey to an end if you like. The power and sheer genius of PageReference fields and chaining selectors really clicked for me while working on this. Tools used: PW (duh!) This module (duh!x2) jTable (as I wait to learn DataTable) - for tabular track list Filtrify to create album catalogue Audio.js to play the embedded audio When this is done, @Horst, we probably want to do a tutorial/write-up about your project and how I did the frontend? Cheers
  7. Horst, OK, thanks. About the filename, what I mean is that if you want to embed a song to play on your site, you need, of course, the path to that filename. Let's say your path is as follows: In your template, if you try to echo that out, e.g. ... <a data-src='{$config->urls->templates}{$track->filename}' href='#'> The output will be which will generate a media not found error, of course... Hope it is clearer now
  8. Horst, OK, here I am to throw a spanner in the works again . I have just noticed songs with VBR are not getting their bitrates captured. I suppose this is because they do not fit into the predefined bitrates we have. So, something with a bitrate of 206 is not getting that captured. The field remains empty. Makes me wonder whether bitrates should just be text (int) fields entered directly in the tracks template (if missing after import) rather than pulled in as page fields? Currently, there is no way to manually edit the bitrate because they are presets What do you think? It also doesn't make sense to create pages just for such uncommon bitrates... edit: File names with potentially risky characters are getting these stripped off on render. E.g. echoing the file name "Let's sing a song..." will have everything after the apostrophe stripped off include ending up with broken paths like this "Let...." Seems some strip tags something is getting to work! Cheers.
  9. <diversion> Oh my word! I didn't know you could pass variables like this "portfolio_categories={$page->id}" to selectors!! I have been defining a variable first, e.g. $category= $page->title. Then passing $title to the selector "category=$category" </diversion>
  10. Good progress! Btw, how to deal with albums with various artists? Currently such albums will appear under the listings of all those artists who contributed. Not much choice here since using "various artists" as artist title will quickly cause confusion where there are several such albums.
  11. And you can even ditch $news in this bit $news = $pages->find("template=news-item, section={$section}, sort=-news_date, limit=5"); ..... foreach($news as $newsitem) like this... (assuming you've ditched $section as well) foreach($pages->find("template=news-item, section={$page}, sort=-news_date, limit=5") as $newsitem) { //do your stuff } Power of nesting! Recently discovered this. It works a treat. For my testing, I have been leaving both styles in my code, commenting out the first of course, with notes about the second shorter version...for my learning purposes... //Aside: Btw, dear gurus, does the 2nd style affect performance? Other issues? If too long maybe can cause readability issues...
  12. @apeisa and Martijn, Nice ones! Never seen them b4.
  13. Exactly! You've opened a can of worms! Just kidding. I think there is a place for such functionality in PW alongside what other modules do. I have so many ideas with what to do with your module it is making my head spin!
  14. Thanks Sinnut! Yeah, it threw me off since I was expecting two repos on my file system - one for dev and one master
  15. Reviving this old topic..hope this post gets picked up I have installed Github for Windows and cloned Ryan's PW. Repos have been downloaded and I can browse both the master and dev branches. My issue is that I want to install the dev branch and not the master. I do not know whether the PW filed Git has downloaded to my local folders are the dev or the master branch. When cloning, I made sure I was viewing the dev branch. So, how do I install the dev branch? Thanks.
  16. As a by the way, for newbies reading post #28 above -> regarding the issues of mass adding/importing images to new or existing PW pages, Ryan's ImportPagesCSV Module can do just that...I wrongly assumed it only does none-file fields http://mods.pw/j
  17. Aah, thanks... Yes, of course seconds could be converted on the fly
  18. I keep forgetting... 1. When the script fails, it does so and closes without giving the user a response.. 2. To add albums later on, do I just run the script again against my new albums? Btw, would it detect if that album is already in the database and not bother to import it? Thanks!
  19. Hmm, it seems I cannot add attachments to the PM...I think that is disabled by Admin. I may have to send it to you via a cloud service...Should I do this? Btw, track length is shown in what I assume to be seconds in my tests. Minute:Seconds would be nice
  20. 1. Both options could work. The important thing is perhaps there should be a pause to prompt the user to make the choice? A separate script would be nice where one needs to add/replace cover images in future. Of course you can also enable this as an option in the main script where the user would be asked whether they wish to import cover images only or audio as well. I prefer the second option though; one single script but with a prompt to the user if they wish to import cover images or not. 2. ID3v2.4.0 onwards I think (wikipedia). It is BPM. I'll PM you a sample mp3.
  21. Horst, I have changed all "multiple page selection" to "single page selection" for the following pages and it works OK but I get an error in the module config. See attachment: album artist bitrate bitratemode genre samplerate By my reckoning there's no need for these pages to be multiple select types. E.g., a track/song can only have one of #3 - 4 & 5; Btw, the case of one song by the same artist but appearing in different albums is not a problem since the different albums will be used to categorise the songs, no? I'll wait for your update. Two feature requests: Automatically copy album cover to PW using the import script. Is this possible? It is tedious manually copying images for each album in PW. Maybe I could use phpMyAdmin to do this (after the fact) and manually create the folder images and copy them to PW. Reading and recording the songs bpm Thanks.
  22. @Soma, The "small" problem is when one needs to use CSS frameworks. Those need to come first before any custom styles. So, I'd want my foundation.min.css to come before mycustomstyles.css. At the end of the day, this file will need to be placed at the very bottom of the list. It's not such a big deal since one can always use a custom admin site template (even just a clone of the default admin theme) in which they can call the js and css in the order they want. This way, no worries about upgrades.
  23. Cool! What did you find was the issue with the importer? Yes, please wait with the update until tonight incase there are issues to report, thanks.
×
×
  • Create New...