Leaderboard
Popular Content
Showing content with the highest reputation on 07/25/2012 in all areas
-
I was supposed to have jury duty today, and they didn't need me. Since I'd already rescheduled today's client work, I decided it was a good time to finally get a start on the PW modules directory. Here it is: http://modules.processwire.com I just added that DNS host so may not be active everywhere yet. There are only a few of my own modules and a couple admin themes in there at present. I need your help populating it (see below). This is just a start, and I've only had a day to work on it. I've got plenty more planned for it and appreciate any feedback you have. How to add your modules For those that have created modules, admin themes or language packs, I need your help populating the directory. When you get to the directory, you can click "Add New Module" in the sidebar and it will take you to a screen where you can add it. You assign an email and password with each module you add so that you can return to make updates as often as you'd like. When you add a module, it puts it in a pending state just so that I can keep out the spam. It emails me when you add a new one, so I'll approve any modules you add asap. Though you view your own module page and continue to make as many edits as you want to regardless of whether it's approved. Nikola and Soma: I put in one each of your admin themes for testing purposes. I've associated these with your email accounts. To modify your admin theme pages in the modules directory, click "edit" on it and scroll to the bottom in "Authentication" and click the link to retrieve your password. Enter your email address and it'll send it to you.3 points
-
Ryan, this, and the whole of PW just reeks of awesomeness! Unfortunately i'm not in a position where i can promote PW in way that would actually matter, so you better set something up so we can contribute in a monetary fashion. You deserve some Euro's coming your way for the pleasure i've had working with PW.3 points
-
Authors of existing modules Please post existing modules to the new modules directory as soon as you are able to. I would add all them myself except that each module gets authenticated with the author. This ensures you are able to make future edits to it. If I went and added all the modules (or imported from that spreadsheet we made awhile back), you wouldn't be able to edit your listing. This is the only reason why I haven't added/imported anyone's modules except my own. Authors of new modules In addition to creating a thread here, please post your module at the new modules directory. You might want to create the thread here first since you'll be asked for the URL when creating your entry in the directory. Add your module to the directory2 points
-
Thanks for adding your modules Pete! I agree I'd like to add this eventually, but really only had a day of time to put towards the directory, so decided to leave that out. I think it's adequate that users can link to their image in the forum or GitHub with the BBCode tag. When I get more time, I'll add file uploads in the directory. This one should be relatively easy with the new TextformatterVideoEmbed module. Though I think I need to modify it a bit to recognize videos in BBCode, since BBCode seems to be using double <br> tags rather than paragraphs. I'd like to do this with a little javascript attached to the <a>, so as to avoid routing the file download through any passthru scripts, especially since we aren't hosting the downloads. But we can only count the downloads that originate from people clicking our download button. We can't track git clones or downloads from there, which I'm guessing would be a significant amount. Still, that may be okay as download quantity probably is still a good factor to judge relative popularity among modules. One cool thing to consider: since we are now requiring a download URL to a ZIP file, and we're providing a web service of the data, we now have the prerequisites for automatic 1-click-installation directly in ProcessWire. It's cool to dream about anyway.1 point
-
Just to make sure I understand, are you asking for the modules directory to publish a JSON/XML feed, or import from one? I know you said "receive", which makes me think import, but you mentioned a modules manager (sounds awesome!) which makes me think you need a feed to read from. But the answer either way is yes. However, I could setup the directory to export/publish it's data to a feed a lot quicker than I could set it up to import it's data from another feed. If you need a feed to read from, I may even be able to get it going later today.1 point
-
Then I would really recommend Submline Text 2 as it's minimal and unlike the other big cluttered IDE's and faster than light, fullscreen, distraction free edition! VIM keys are no problem. I choose sublime because of all of this.1 point
-
You can adjust the length issue in your MySQL settings (search forum for ft_min_word_len). But unless you are dealing with a really large site, you might just want to use the %= version, which uses MySQL LIKE. This will also solve the stopwords issue. It's supposed to be a whole lot slower, but you likely won't be able to tell any difference in speed until you get into tens of thousands of searchable records.1 point
-
Seems normal regarding "about" because it's a stopword and has been asked already here. Not sure about "site map" using ~ . It looks to me as the search doesn't let you search for two words. static protected $stopwords = array( "a's", "able", "about", "above", "according", "accordingly", "across", "actually", "after", "afterwards", "again", "against", "ain't", "all", "allow", "allows", "almost", "alone", "along", "already", "also", "although", "always", "am", "among", "amongst", "an", "and", "another", "any", "anybody", "anyhow", "anyone", "anything", "anyway", "anyways", "anywhere", "apart", "appear", "appreciate", "appropriate", "are", "aren't", "around", "as", "aside", "ask", "asking", "associated", "at", "available", "away", "awfully", "be", "became", "because", "become", "becomes", "becoming", "been", "before", "beforehand", "behind", "being", "believe", "below", "beside", "besides", "best", "better", "between", "beyond", "both", "brief", "but", "by", "c'mon", "c's", "came", "can", "can't", "cannot", "cant", "cause", "causes", "certain", "certainly", "changes", "clearly", "co", "com", "come", "comes", "concerning", "consequently", "consider", "considering", "contain", "containing", "contains", "corresponding", "could", "couldn't", "course", "currently", "definitely", "described", "despite", "did", "didn't", "different", "do", "does", "doesn't", "doing", "don't", "done", "down", "downwards", "during", "each", "edu", "eg", "eight", "either", "else", "elsewhere", "enough", "entirely", "especially", "et", "etc", "even", "ever", "every", "everybody", "everyone", "everything", "everywhere", "ex", "exactly", "example", "except", "far", "few", "fifth", "first", "five", "followed", "following", "follows", "for", "former", "formerly", "forth", "four", "from", "further", "furthermore", "get", "gets", "getting", "given", "gives", "go", "goes", "going", "gone", "got", "gotten", "greetings", "had", "hadn't", "happens", "hardly", "has", "hasn't", "have", "haven't", "having", "he", "he's", "hello", "help", "hence", "her", "here", "here's", "hereafter", "hereby", "herein", "hereupon", "hers", "herself", "hi", "him", "himself", "his", "hither", "hopefully", "how", "howbeit", "however", "i'd", "i'll", "i'm", "i've", "ie", "if", "ignored", "immediate", "in", "inasmuch", "inc", "indeed", "indicate", "indicated", "indicates", "inner", "insofar", "instead", "into", "inward", "is", "isn't", "it", "it'd", "it'll", "it's", "its", "itself", "just", "keep", "keeps", "kept", "know", "knows", "known", "last", "lately", "later", "latter", "latterly", "least", "less", "lest", "let", "let's", "like", "liked", "likely", "little", "look", "looking", "looks", "ltd", "mainly", "many", "may", "maybe", "me", "mean", "meanwhile", "merely", "might", "more", "moreover", "most", "mostly", "much", "must", "my", "myself", "name", "namely", "nd", "near", "nearly", "necessary", "need", "needs", "neither", "never", "nevertheless", "new", "next", "nine", "no", "nobody", "non", "none", "noone", "nor", "normally", "not", "nothing", "novel", "now", "nowhere", "obviously", "of", "off", "often", "oh", "ok", "okay", "old", "on", "once", "one", "ones", "only", "onto", "or", "other", "others", "otherwise", "ought", "our", "ours", "ourselves", "out", "outside", "over", "overall", "own", "particular", "particularly", "per", "perhaps", "placed", "please", "plus", "possible", "presumably", "probably", "provides", "que", "quite", "qv", "rather", "rd", "re", "really", "reasonably", "regarding", "regardless", "regards", "relatively", "respectively", "right", "said", "same", "saw", "say", "saying", "says", "second", "secondly", "see", "seeing", "seem", "seemed", "seeming", "seems", "seen", "self", "selves", "sensible", "sent", "serious", "seriously", "seven", "several", "shall", "she", "should", "shouldn't", "since", "six", "so", "some", "somebody", "somehow", "someone", "something", "sometime", "sometimes", "somewhat", "somewhere", "soon", "sorry", "specified", "specify", "specifying", "still", "sub", "such", "sup", "sure", "t's", "take", "taken", "tell", "tends", "th", "than", "thank", "thanks", "thanx", "that", "that's", "thats", "the", "their", "theirs", "them", "themselves", "then", "thence", "there", "there's", "thereafter", "thereby", "therefore", "therein", "theres", "thereupon", "these", "they", "they'd", "they'll", "they're", "they've", "think", "third", "this", "thorough", "thoroughly", "those", "though", "three", "through", "throughout", "thru", "thus", "to", "together", "too", "took", "toward", "towards", "tried", "tries", "truly", "try", "trying", "twice", "two", "un", "under", "unfortunately", "unless", "unlikely", "until", "unto", "up", "upon", "us", "use", "used", "useful", "uses", "using", "usually", "value", "various", "very", "via", "viz", "vs", "want", "wants", "was", "wasn't", "way", "we", "we'd", "we'll", "we're", "we've", "welcome", "well", "went", "were", "weren't", "what", "what's", "whatever", "when", "whence", "whenever", "where", "where's", "whereafter", "whereas", "whereby", "wherein", "whereupon", "wherever", "whether", "which", "while", "whither", "who", "who's", "whoever", "whole", "whom", "whose", "why", "will", "willing", "wish", "with", "within", "without", "won't", "wonder", "would", "would", "wouldn't", "yes", "yet", "you", "you'd", "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves", "zero"); /**1 point
-
Hi, Another wee txp > PW conversion, this time for Jendi who are a fashion wholesaler: http://www.jendi.com.au/ Regards Marty1 point
-
I've updated this to include yellowled's suggestion of making the code appear in a form field - easier to copy and paste plus it looks neater. Also turned off autoload at ryan's suggestion. Thanks guys! I would love to see this, though I think it would only happen for something like the blog profile ryan is working on, since the basic layout is pretty much standardised (so the user has no need to move the layout around if they don't want to). In that case and in the case of other standardised site profiles, I'd be happy to modify the module to automatically insert code. I guess in that instance, what you would want it to do is scan the installed theme for any links and scripts and try to replace them automatically with a couple of minified strings, something that would have me tearing my hair out trying to work out the regexp for I think I'll cross that bridge when ryan builds it1 point
-
If I understand correctly, you want to change the rendering context at runtime if certain conditions are met. You have a few options. 1. You could set your $video to have a different template file before calling $video->render(); /site/templates/home.php $video->template->filename = 'teaser.php'; echo $video->render(); 2. Or you could throw up a flag that your video.php template file knows to look for: /site/templates/home.php $input->whitelist('teaser', 1); echo $video->render(); …and in your video.php: /site/templates/video.php if($input->whitelist('teaser')) { include('teaser.php'); } else { // render full video page } The advantage here is that all your video rendering code is together in one file. 3. Or you could include your teaser.php from home.php manually: /site/templates/home.php $_page = $page; $page = $video; // substitute $page before including teaser.php include('./teaser.php'); $page = $_page; // return $page to it's original state 4. Or you could isolate the teaser rendering to a function (perhaps included from another file): /site/templates/functions.inc function renderTeaser($page) { return "<p><a href='{$page->url}'>{$page->title</a><br />{$page->summary}</p>"; } /site/templates/home.php include('./functions.inc'); echo renderTeaser($video); This last option is the one I'd be most likely to take as I think it's probably one of the lowest overhead, it's easily reusable across different templates, and requires very little consideration wherever you use it. Here's another way you can do the same thing, by actually adding a renderTeaser() function to the Page class at runtime: /site/templates/functions.inc function renderTeaser(HookEvent $event) { $page = $event->object; $event->return = "<p><a href='{$page->url}'>{$page->title</a><br />{$page->summary}</p>"; } $this->addHook('Page::renderTeaser', null, 'renderTeaser'); And now you can do this: echo $video->renderTeaser(); Btw that line that has $this->addHook(); has null as the 2nd argument because the function is outside of a class. Some people create auto-loading modules to contain rendering functions, in which case that 2nd argument is the module's object instance.1 point