Jump to content

ndolph

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by ndolph

  1. I literally just had this error, and had to apply the fix mentioned. This was never fixed?
  2. As the subject says, CKEditor will completely ignore mystyles.js in the site/modules/InputfieldCKEditor - it loads from wire/modules/Inputfield/InputfieldCKEditor if I remove mystyles.js from the wire directory, CKEditor will not load. What is the point of mystyles.js in the site folder then if it is not used? Or is something broken?
  3. I deleted the field using the ckeditor and recreated it and now its working for some odd reason... I guess we can call this solved?
  4. I've solved my issue with the following... $menu = $modules->get("MarkupSimpleNavigation"); $menuoptions = array( 'parent_class' => '', 'current_class' => 'active', 'has_children_class' => 'dropdown', 'outer_tpl' => '<ul class="nav navbar-nav">||</ul>', 'inner_tpl' => '<ul class="dropdown-menu" role="menu">||</ul>', 'list_tpl' => '<li%s>||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}">{title}</a>', 'item_current_tpl' => '<a href="{url}">{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<a href="{url}">{title}</a>', 'xitem_current_tpl' => '<span>{title}</span>', 'date_format' => 'm/d/Y', 'code_formatting' => false, 'selector_field' => 'nav_selector', 'debug' => false ); function fixBootDrop($event) { $link = $event->arguments('page'); if ($link->url == '/') return; // Ignore home if ($link->numChildren > 0) $event->return = '<a href="' . $link->url . '" class="dropdown-toggle" data-toggle="dropdown">' . $link->title . '<span class="caret"></span></a>'; } $menu_items = new PageArray(); $events = $pages->get("/events/"); $events->nav_selector = "limit=5, sort=-event_ot_date"; // define a selector $menu_items->add($events); $restofstuff = $pages->find("!manual_nav=1, parent=/, sort=sort"); $menu_items->add($restofstuff); $menu->addHookAfter('getItemString', null, 'fixBootDrop'); Added the manual_nav field to pages that I want to manually render. The rest comes in with the $restofstuff. I'm sure there is a cleaner way of doing this and I'll optimize later and post results.
  5. I'm having a big issue right now, I enter page content into a CKEditor field inside a repeater, and it will not save what was entered into it... See attached video to see what I'm talking about. I've got to get this site launched tomorrow :\ Screen Record_2015-02-16 13.57.50.mov
  6. I'm attempting to add a plugin to CKEditor, specifically this one -> http://ckeditor.com/addon/fontawesome So far, its installed and working, but I had to put a copy of the plugin in the ckeditor-4.4.3 folder under wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.4.3/plugins to make it work. Whatever, that is no big deal, but now when I add a fontawesome icon, I hit save and nothing in that field is saved.... I think it has to do with step 5 of the installation that I didn't do and don't know where to place.. In your HTML's <head> section add this code: <script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script> Any assistance would be nice to know how to get this all working properly.... Edit- Okay, it seems that these repeaters are not saving properly? I can't get it to save anything in the body field...
  7. I've figured this out, for anybody searching it is under... Setup -> Fields -> field_name -> Input -> Visibility -> Show this field only if... It is now doing what I wanted it to do
  8. I'm working on a website that needs to be able to post events... I've got a basic system going with the following -> event_date event_title event_location So far, I can print out an event list, and pull up a full event page, but I need to expand it a bit and I have some questions... I need to include repeating events, and in order to do this I suppose I need the option of selecting a repeating event, or one time event. When selecting this, I figure they would hit a check box for "Repeating Event" and it would disable input on a single event, and enable a fieldset for a repeating event, with the option of repeat on the date, or repeat on the day of the week. Am I able to dynamically (ajax or jquery or something) enable and disable fieldsets during the creation of the event in the admin panel?
  9. Eh, let me start over... The menu I have rendered now is fine. I see how I could hide things from navigation too, that is good. I need to know how to inject an item manually into the menu. Such as... Home Events Photos Places Things Items Events sub menu is Events -Event1 -Event2 -Event3 -Event4 -Event5 -Event6 -Event7 -Event8 -Event9 I would simply hide the Events menu from the navigation, but then inject a manual Events item with the following Events -Event1 -Event2 -Event3 -Event4 ----------- -Show all Events The 4 events shown would be selected by their event date and organized as such. That way I don't have an Events menu with ALL the entries in it. I don't want to limit my menu to certain templates etc, because I use multiple templates all over the site to render data properly.
  10. I've reset the settings of the field and have settled with this, I like displaying the date in a different format for certain places that this is embedded... function events_list($location) { $dateFormatOut = 'D M j Y'; $dateSelectorFormat = 'l F j Y g:i a'; $dateQueryComparison = ''; $outString = '<li><strong>%s</strong> - %s</li>'; // If you need to change this for a specific case, do so in the switch below. %s is printf() string representation // Switch to alter options depending on location switch($location) { case 'carousel': $dateFormatOut = 'l F j Y g:i a'; $dateQueryComparison = '>='; break; case 'past': $dateQueryComparison = '<='; break; case 'upcoming': $dateQueryComparison = '>='; break; } $events = wire()->pages->get('/events/')->children(sprintf('start=0, event_date%s%s, limit=5, sort=-created', $dateQueryComparison, date($dateSelectorFormat))); foreach ($events as $event) { printf($outString, $event->title, date($dateFormatOut, $event->event_date)); } }
  11. I was using a standardized date format before and it didn't work for some reason. Changed the field to use l, F j, Y g:i a and changed the code to the following.. $events = wire()->pages->get("/events/")->children('start=0, event_date>=' . date("l F j Y g:i a") . ', limit=5, sort=-created'); It now works. *thumbs up*
  12. This is my code... function events_carousel() { $events = wire()->pages->get("/events/")->children('start=0, event_date>=' . date("Ymd") . ', limit=5, sort=-created'); foreach ($events as $event) { echo "<li><strong>" . $event->title."</strong> - ".$event->event_date . "</li>"; } } And this is the output.. Back to the future! - 20141217 MORE MULTI EVENT DAYS - 20150121 Testing multi day events - 20150121 Whisper does things - 20150126 Crazy dog stuff - 20150121 But, it shouldn't display "Back to the future!", but it doesn't seem to care about the event_date. Where am I going wrong?
  13. That sounds like a way of doing it, but, I don't quite know how to accomplish this... I could get the page array going and the top nav list I guess, but how would I create a sub menu for the events top nav?
  14. I need to modify a menu a bit... I've got an events page, with individual events as children. It goes events-list >event 1 >event 2 >event 3 Sorted by the event date. I want to limit the way the menu shows that.. I want only the next 5 upcoming events shown, with a menu break at the bottom, and then a link at the very bottom to "View all Events" Not sure how to accomplish this really... Also, how do I make it so that the menu will not render a dropdown for children of X page? And how do I exclude pages from appearing in the menu all together? Preferrably using a checkbox field?
  15. Ah I figured this as it works inside of another file that is included different etc... The built-in pagination support doesn't make sense to me and how I'm trying to impliment it honestly...
  16. Eh, changed my mind on the approach I guess.... I thought PW had built in pagination? Probably not for what I want to do though or how I'm doing things.
  17. So, I've got this really really simple function in functions.php function dopagination() { $numofpages = $pages->count("has_parent=/posts/"); return $numofpages; } And then I have this in pagination.inc <div class="row"> <div class="col-md-12"> <?php $pagination = dopagination(); echo $pagination; ?> </div> </div> And it pukes this at me... Error: Call to a member function count() on a non-object (line 23 of /var/www/de.net/dev/site/templates/functions.php) This error message was shown because you are logged in as a Superuser. Error has been logged. Uhm, am I doing something really wrong?
  18. I hate to resurrect an old topic, but the page-publish permission does not work... was this changed since this was posted? Edit- Um, never mind. Its page-publish not page-publsh I feel so dumb...
×
×
  • Create New...