-
Posts
2,765 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
last i checked this was still working: <?php $id = $video->youtube_video_id; // this needs to be the ID $content = file_get_contents("http://youtube.com/get_video_info?video_id=".$id); parse_str($content, $ytarr); echo stripslashes($ytarr['title']); // title of video
-
yes! the image description would work really well, i can't think of any better way;
-
Hey adrian - quick question - what about supporting getting the video title? I used to have clients put in the youtube ID and then i could get the thumbnail and the video title from yt api at runtime, but now i'm using your module since i prefer storing the poster image locally; but now i can't get the title of the video unless i somehow regex out the video id from the URL.. tia!
-
Repeaters: sorting input fields; listing according to input fields
Macrura replied to joe_ma's topic in Getting Started
your code is kind of messed up, you can't set the variable when you're making the days array, that array has no relation to the later array $days = array(); // array for dates $events = $pages->find("template=repeater_time_loc, check_access=0"); //get all the repeaters with event information foreach ($events as $event) { $days[] = $event->getUnformatted("date"); // put event date into the array } $day = array_unique($days); // eliminate duplicate dates asort($day); foreach($day as $key => $d) { // list all the dates $today_events = $events->find("date=$d"); // find the array of events for this date and put into new array $today_events $dat = date('l, d. M Y', $d); echo "<h3>($key) = $dat</h3>"; foreach ($today_events as $doday_ev) { echo "<p><a href='{$doday_ev->getForPage()->url}'>{$doday_ev->getForPage()->title}, {$today_ev->time} Uhr</a></p>"; } } -
Repeater: how to find the url of the parent page?
Macrura replied to joe_ma's topic in Getting Started
sure, and you are better off anyway having the performers as pages as onjegolders suggested, but since repeaters are also a type of page, it's also good to know how to work with them as such, because sometimes you do need to build things that way, when for example a repeater object is going to be permanently attached to a page, there's no reason to have it be separate; -
Repeater: how to find the url of the parent page?
Macrura replied to joe_ma's topic in Getting Started
i think there are some unnecessary steps here, you could just do this: $mw = $pages->find("template=repeater_mitwirkend, check_access=0"); http://cheatsheet.processwire.com/selectors/built-in-page-selector-properties/check_access-0/ then you have all the performers; to get the page you use: $event = $mw->getForPage(); https://processwire.com/talk/topic/958-repeatable-fields/page-12 -
did you enable access for that role on the home template and the admin template? i think user access has to cascade from the home
-
you can have your own custom js for any form, so you could duplicate a formbuilder theme, then add all your custom JS.. here's an example of a formbuilder form using some custom js: http://www.pinw.org/inquiry-form/
-
Set input field to locked, but not collapsed.
Macrura replied to renobird's topic in Module/Plugin Development
i was wondering this same thing a few days ago, have a template where the title field is changed on page save, so don't want it editable, but needs to be visible... -
enable tags on image field.. use tag 'featured' $images = $page->images->findTag('featured'); or get first an array of all images from the template gallery or whatever then run your findTag on that array
-
Hi steve, is there any chance that something changed on this new version that would truncate the field in the email if it has line breaks? I have this new version installed on a site but it is only showing the 1st line of the field, whereas the other site is using the old version and shows the complete field; they are on different hosts, so there could be something with that;
-
just wondering if this should be added as a bug report for inputfield.js - is there a way to sanitize those special characters, i usually have to manually sanitize my files before trying to upload.. but for users who don't know about this they could get stuck trying to upload and having it fail because of the filename TypeError: Cannot convert string to ByteString because the character at index 5 has value 769 which is greater than 255. InputfieldFile.js:247
-
that works perfectly.. i was able to have the page title in the email as well as create direct links to the page editor... Many thanks!
-
well you're not making it clear what you want your selector to be and you are probably making it too complicated. you should check the way the search processor i posted is setup, in that code each discreet element in the selector is added after checking to see if there exists the get variable.
-
hi steve, thanks - that would be awesome..
-
if you need some more examples,i posted 2 gists from a site i made: https://gist.github.com/outflux3/5690429 https://gist.github.com/outflux3/5690423 these should be pretty obvious and provide enough different examples to get you going with setting up the search form, search processor, and search results;
-
@netcarver - thank you for this module, I'm finding it really useful for several sites! One question is how can i modify the sent message to also include info about the page where the field was changed, as well as maybe a link directly to the admin edit for that page. TIA
-
the search form in the default profile should cover the basics, and can easily be extended and modified
-
i can confirm that processwire can handle all of the above requests with no problem (you could practically say that PW excels at all of these things)... just set it up and go!
-
wow, I've read your post 2x and i still have no idea what you are asking. i don't know what the word uren means. but your $pages->find looks basically correct, that would result in a page array, since you are using find. after that i have no idea what you want to do, but you will need to foreach the results.
-
you may have reached a point where MSN can't exactly output the precise markup you need, though maybe its possible; MSN is really amazing and can do some really complex menu structures; but if you want to build a megamenu, then you might want to consider doing your own menu system: https://processwire.com/talk/topic/2787-custom-menu-not-related-to-page-tree/?hl=%2Bcustom+%2Bmenu i just setup a menu for a site which uses both regular menu drops and also mega menu; i was able to get that to work by putting an option in my menu-item template for it to activate the mega menu, then there is a way to group the child items of that into columns etc..
-
custom selector to find pages, maybe try $page?
-
1.) selector, path, or ID is correct. 2.) the 404 page uses the basic-page template, so the selector executed correctly.
-
what are the field names in your repeater
-
using pages for selects is better, unless it's a situation where you have a tiny # of options and no difference between the displayed value and the actual value