-
Posts
676 -
Joined
-
Last visited
-
Days Won
4
Everything posted by matjazp
-
Hi! I plan to upgrade from 2.4.2 to 2.5.2 (latest stable?). I know one should just replace wire directory (and index.php and .htaccess - I'm on windows with IIS) with new version, but still, should I expect problems? Or should I use upgrade module? I use just a few modules PageListPin, JqueryDatatables, Ckeditor, Fieldtypeselect. I also copied wire\modules\AdminThemeDefault to wire\templates-admin to use with my custom ProcessPageEdit module. I wasn't following the developement and this forum for few months, I just noticed some modules that might be of help (Databasebackups, Siteprofileexporter, ProcesswireUpgrade beta). I'm just a bit confused and need guidance (and help if something goes wrong). Since backup is everything, what is the best approach to make databased backup (and restore later on)?
-
How to render simple link (eg. Cancel) in the form right after the Save button on page edit?
-
Hi! How to write a module (where to hook) if I would like to use page edit link in front-end and perform redirect after successful Save (returning url could also be the same page the link is displayed): $url = $config->urls->admin . "page/delete/?id={$page->id}&modal=1&redirectUrlAfterSave=somewhere"; echo "<a href='$url>edit</a>";
-
Is ProCache supported on IIS?
- 20 replies
-
- cache
- markup cache
-
(and 2 more)
Tagged with:
-
inserting links from link list using tinyMCE
matjazp replied to wobe's topic in Module/Plugin Development
I'm interested ... -
horst, thank you for both scripts. I'm using your first solution and that's all I need.
-
Yes, it would be easier. Maybe Ryan will see this post ... Another question: I have a page with two Filetype fields: files (multiple files are allowed) and onefile (maximum file upload = 1). User is allowed to access just onefile (I'm using fredi), he uploads the file and then this new uploaded file should get appended to other files: if($page->onefile) { $page->setOutputFormatting(false); $page->files->append($page->onefile); $page->save(); $page->setOutputFormatting(true); } Now I would like to "empty" onefile field to be ready for the next upload but without deleting the actual file itself.
-
I would like to reverse the order of files listed in File field type. File upload form would be displayed first, then the list of files, new files would be listed at the top, older at the bottom. Possible?
-
horst, thx for the hints. Another question: how to "move" individual file object from one File field to another File field without removing the file itself? Eg. have a page with two fields: files (multiple files are allowed) and onefile (maximum file upload = 1). User is allowed to access just onefile (I'm using fredi), he uploads the file and then this new uploaded file should get appended to other files: if($page->onefile && count($page->onefile)) { $page->setOutputFormatting(false); $page->files->append($page->onefile); $page->save(); $page->setOutputFormatting(true); } Now I would like to "empty" onefile field (to be ready for the nex upload) but without deleting the actual file itself.
-
I have a page with files (attachments). I would like to allow a user to add files as simple as possible. I don't want to give the user full access to admin. So click on the link/button "Add new attachment" would open modal with login form, after successful login a file upload would be presented to the user and he would upload the file. Thanks for any hints.
-
1.) Didn't know its that easy 3.) I ended up using pages (like 100 of them, growing each month, used as minutes of a meeting) with just title and file field. Page title is used as description. That also gives me an option to sort pages by -created (newest on top), and also gives an option to create new page from the "Add New". 4.) International characters gets deleted, they should be replaced (š->s, ž->z et c) like when slug is created from title.
-
Hi, I have some questions: How to access placeholder value on textfields in templates(.php)? eg. $var = $page->mytextfield->placeholdervalue; How to use pwlink, used in ckeditor, in templates (APIs)? I could create my own fields but why invent the wheel? (Wishlist: add fullscreen plugin to ckeditor ). How to replace file in File field type and preserve file name and position (now I delete the file, add new one, move to the right position, very annoying). How to prevent file name modification when uploading file (eg. don't want blanks get replaced with underline)?
-
Yes, that's what I was looking for, /{$page->id}/ is ok for me (didn't try site map)! Great job, thank you. Suggestion: if I choose to rewrite all links, then enabled templates/pages are probably irrelevant.
-
@Pete: for me it is much easier to remember the number eg. 1058 than some-very-long-fancy-url. @Adrian: fix for PW subdirectory is ok. Let me know if you modify your module to support id based render methods.
-
Thx for the link. If you know where and when to hook ... Yes, this would be very nice addition to your module. And yes, that would apply only to specific (selected) pages/templates (or all if none is selected). Maybe this settings should be in the page and template instead in the module. I also found a small bug: if you run PW in subdirectory, then example links in "ShortLinks" are not correct (subdir is missing).
-
I would like that all PW modules/function/methods be aware of possibility to use IDs instead of urls. Let say I have page with title Test (url=test, id=1000) and two children: Foo (url=foo, id=1001) and Bar (url=bar, id=1002). echo $page->children->render(); produces something like: <ul> <li><a href="/foo/">Foo</a></li> <li><a href="/bar/">Bar</a></li> </ul> What I would like is that echo $page->children->render(); creates this: <ul> <li><a href="/1001/">Foo</a></li> <li><a href="/1002/">Bar</a></li> </ul> Your module just add an option to use ID on specific templates/pages (and that is great) but I have to write my own method/function to display ID's, because render() will always echo page url and not page ID. I hope I made myself clear (English is not my native language).
-
Thx, Adrian, but this will not work when using $page->children->render() or renderPager() (and a lot of others I assume) since they use page->url to generate the markup instead page->id ...
-
How to make PW use IDs instead of slugs in general, like all pages? Or just on some pages (user choice)?
-
Is ProCache supported on windows server with IIS?
-
Hi, I'm new here and have a question. I've tested HiddenAdminPages.module from somatonic but it would be nice to have similar module for roles instead for users. I have just some basic knowledge of php (trying my best) and don't know how to do it. Matjaž EDIT: I got it, can send the code if someone is interested.