-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
Maybe the admin themes could feature a hook in that place so it could be edited without modifying core files.
-
Regarding page reference for page/product's categorization
LostKobrakai replied to adrianmak's topic in General Support
Remove the parent "Home". -
wireshell - an extendable ProcessWire command line interface
LostKobrakai replied to marcus's topic in API & Templates
That's probably a include path or permission issue within your operating system rather than an issue of wireshell. Composer does use a specific folder to install global packages and this does need to be included in your users path variable and you need to have permission to execute files in that folder. -
Facebook is using custom meta tags to determine besides other things the images related to a website, if you're not using it there will be no image.
-
As any javascript feature you can surely use this with processwire. Nobody does care how you create your markup and if it comes from an index.html or any server side scripting.
-
You've still two jquery versions in there. That's like doing this and wondering why there's no " + fancybox" in the string. Just remove the jquery-latest.min.js. $jquery = "jquery"; $jquery .= " + fancybox"; //add fancybox $jquery .= " + foundation"; //add foundation $jquery = "jquery";
-
How to set text line/character limits in templates?
LostKobrakai replied to photoman355's topic in General Support
@mr-fan Soma's solution does already strip tags. -
How to modify/add the templates setting
LostKobrakai replied to kreativmonkey's topic in Module/Plugin Development
You probably want to use addHookAfter and add just your additions to the returned form object. With the other hooks you cannot modify the form, as it's created inside the function. Also make sure you're getting your hooks correct. Either use a function (without parameters) or a anonymous function. Also the function does not receive a template anymore, but the $event variable. Here you've an example using an anonymous function to add a new field into the form: https://processwire.com/talk/topic/11069-sorting-images-in-backend/?p=103687 -
How to set text line/character limits in templates?
LostKobrakai replied to photoman355's topic in General Support
Shortening text while retaining valid html is quite a bigger topic than simply limiting the textlength, maybe this can help you: http://stackoverflow.com/questions/16583676/shorten-text-without-splitting-words-or-breaking-html-tags -
And to make things more obvious I'd suggest putting all scripts either in the head or even better all at the end of the body.
-
Understanding wakeupValue, sleepValue, sanitizeValue
LostKobrakai replied to Robin S's topic in Module/Plugin Development
Yeah the whole wakeup/sleepValue topic is a bit hidden in the code. Here's wakeupValue https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Page.php#L605 and here's sleepValue (kinda) https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Pages.php#L1252. And sanitizeValue is always called when a value is set to the field, so it's also called when your inputfield's data are set to the field when saving the page. -
noPop is not in the core, it's just a random key to give to the session variable. It's the same as $session->get("noPop");
-
You second jquery file overwrites the first instance to which fancy box did bind itself. The overwritten jquery does not know anything about the previously bound fancybox.
-
RT @udovetter: Ein Rechtsstaat sollte nicht hart antworten. Sondern angemessen. Sonst ist er nämlich keiner mehr.
-
You're including jquery twice: jQuery in <head>, add fancybox to it and the jquery before </body> does overwrite the previous jquery instance with fancybox.
-
You've some error in including fancybox, as the console shows this error: $(...).fancybox is not a function.
-
Youtube videoEmbed scaling with Foundation 6
LostKobrakai replied to kuba2's topic in Getting Started
You need to put every video – and only the video iframe – in a separate video-container. If you do that in the textarea or anywhere in your code does not matter, as long as it's there. Edit: Foundation 6 does already have a class for that http://foundation.zurb.com/sites/docs/flex-video.html. Just to make you aware. -
Regarding page reference for page/product's categorization
LostKobrakai replied to adrianmak's topic in General Support
I think the only solution would be hook into InputfieldPage::render and replacing all it's logic with a custom implementation for the field you need the optgroups for. -
No problem. Nobody here expects people to keep track of everything, especially if it's not a topic in the forums. I just included it because it mentions the tech. difficulties around the feature.
-
Understanding wakeupValue, sleepValue, sanitizeValue
LostKobrakai replied to Robin S's topic in Module/Plugin Development
Isn't the string you're seeing in the log from your inputfield, which you said to be setting a string currently? Probably the sane way to handling the data would be that the runtime value is always the image obj. The sanitizeValue method will make sure any other valid (user) input, like the db string format, is converted to the runtime obj. sleepValue und wakeupValue will only handle the string to runtime obj conversion for both directions. -
To store data in a database table there's no need for any custom fieldtype. These are only needed if you want to create custom fields. If your module does just need a place to store e.g. configuration, you could also just use standard sql queries and if that's to bare bone there's always the option to let a orm library handle it or rather any library that abstracts the sql queries for you. There's also the option to use the module configuration automatisms to store information, which is stored json encoded, but might be enough for smaller configurations. It's true that fieldtype development is not very well documented officially, but it's actually not much different from what the teaser video in the starting post does show besides the UI factor. It needs a table column setup (getDatabaseSchema()) and some runtime to database conversion (sleepValue()) and db to runtime conversion (wakeupValue()). While the fieldtype events plugin is mentioned in the forum as kind of entry point to fieldtype development I found it a bit overwhelming at first, as it's starting out as multi-value field and is therefore more complex than it would need to be in the beginnings. With just extending the core fieldtype class and changing up those three methods you should be able to get a fieldtype working and then you can add functionality like sanitization or subfields and so on on top of it.
-
Here's a lot of the tech. discussion around such a feature: https://github.com/ryancramerdesign/ProcessWire/issues/302
-
select field type who uses images for preview changes
LostKobrakai replied to Chris's topic in Wishlist & Roadmap
Here you go. Images need to go into /site/templates/ImageSelect/[path/] and must be named [optionValue].jpg. For usage with FieldtypePage you need to add the module in the settings of InputfieldPage. For the newer options fieldtype it's available right away. Edit: My version might be more suited to the usecase of presenting layout options to the admins, rather than having a full blown thumbnail display. Archiv.zip -
You can use the WirePDF module with any kind of markup you need. I'm using wireRenderFile() to render the html with custom data and then pass it into WirePDF.
-
There's no way to hook anything in regards to the session starting. This all happens in processwire's bootstrap part, before even the earliest hooks would run. But with Ryan having a processwire javascript api on the roadmap it may be time to discuss if pw 3.0 shouldn't support authentication without session.