-
Posts
2,776 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
that call would go right before your other settings; also make sure that your $items returns some pages
-
you would need to instantiate the class first, e.g. call the module into an object: $rss = $modules->get("MarkupRSS");
-
echo $author->FirstName; just curious - in PW the field usually doesn't have arguments (?)
-
i would have tried this first $matches = $pages->find("template=portfolio, title|first_name|last_name|body|portfolio_images.tags*=$q, limit=150"); but if that didn't work then maybe or groups: $matches = $pages->find("template=portfolio, (title|first_name|last_name|body%=$q), (portfolio_images.tags*=$q), limit=150");
-
Hi douglas81, I'm not an expert on this, but i think what I might try in this case would be to: 1.) rebuild your config.php - maybe from a vanilla install, or another site; 2.) change the password of the superadmin from the API, which would then presumably use the new userAuthSalt; <?php $admin = $users->get('admin'); // username of superadmin $admin->of(false); $admin->pass = 'yo12345'; // put in your new password $admin->save();
-
Hanna code is certainly a great way to place an audio file into a textarea, the files themselves loaded into your files field and then referenced in the RTE; to make it easier for editors you could add tagging on the files and then reference the tag in your hanna code. Using the RTE itself, you could simply use the link button and then select the audio file. Then you can initialize that with something like Soundmanager2. So in other words, you would end up with an anchor in your textarea linking to an audio file, which then using a jQuery selector could be turned into a player. For more control, you could check the field (e.g. using strpos) at the top of your template file, and then do a str_replace on the field. The main advantage in that is that you could initialize the audio players and load specific assets based on the existence of said mp3 link, instead of on all pages, and you could also replace the simple anchor with more specific markup that might be required for your player. Lastly you could make a module that would essentially do the same thing, and apply it as a textformatter to the field.
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Macrura replied to ryan's topic in Modules/Plugins
I would make this with regular PW pages (events), and then selectable options for game or tournament (asm select would allow both to be selected). if the event is a tournament, then you show a page-table field for child events, which would be similar to the event template but assume they are games (if they are child of an event marked as a tournament) -
you could assign a runtime parameter to them, see this topic for an example: https://processwire.com/talk/topic/10920-remove-duplicates-in-a-foreach-loop-but-count-them/?p=102592 notice how this assigns a count as a runtime parameter: $i->useCount = count($pages->find("interests=$i"));
-
nice work and you should submit it to the showcase
-
Image fields stop saving descriptions after a while
Macrura replied to OviS's topic in General Support
@OviS, IMHO it wouldn't make sense to migrate a site off of processwire prior to doing a simple alternate server test, b/c once you know it's the server and not PW, won't you regret that decision? -
you could use a class on the anchor, and then have your modal target that
-
Image fields stop saving descriptions after a while
Macrura replied to OviS's topic in General Support
@OviS, i'm also sorry to hear about the troubles you are experiencing. I can only comment on the steps I would take if I was in your situation, and that is I would copy the whole site to a different server and see if the problem still happens. In your description of the problem, you said this was happening to many sites on one server, and if we assume that your situation must be unique, as no one else has reported anything similar, then the server would be my prime suspect. In addition, Arjen reports the same issue was solved by migrating servers. -
i think 3.0 is a namespaced version, so be careful, it comes with some caveats for usage. Keep an eye out for info on this.
-
yeah, this is totally fine with me (didn't think of doing it this way.)... leave the module!
-
thx - right, but in my case i needed the class on the UL; i could fiddle with the CSS and see about adding those classes one level up as a wrapper like you have..
-
hey Soma, thanks for this, it's working really well for a project i'm doing right now! I ended up needing to add some classes to the outer wrapper...(the buttons are in a share button which opens a menu).. i was wondering if you might consider adding a config option at some point for outer wrapper class, if you think that may be of use to others.
-
yep, you may want to start off not using _main.php. in my processwire web dev class, i have the beginners do simple head.inc and foot.inc includes.
-
Deleting file field's files via API not working or timing out
Macrura replied to hellomoto's topic in General Support
how about try this before you remove: $page->of(false); // to this before the removeAll(); $page->tracks_upload->removeAll(); $page->save(); -
Developer centric form processor
Macrura replied to Mike Rockett's topic in Module/Plugin Development
YAML support would be cool! -
cool - thanks! loving to hear more suggestions and enhancements. This simple recipe is going to make things at least 50% easier for my clients, especially those who seldom access their sites and then when they do they can't remember where anything is... arriving at the page tree for about 70% of my sites is a non-sequitur; For example on New Focus Recordings, we use almost exclusively listers, so better to login and land on a quicklink list so you can get where you need and maybe not even see the (wonderful) page tree at all.
-
Sometimes you have clients who will login to the admin, and they perhaps only need to access a few areas of the site, such as: a product or blog list (ListerPro) site settings formbuilder entries specific front end pages documentation helpdesk backup interface Server health or server status (for example site5 has a page for every server to see it's status) Link to a bookmark (page tree bookmark for example) - this is awesome by the way Run a special action like clear a wirecache or other custom caching Add a billing or late payment notice Add an alert about upcoming server maintenance The Problem: How can you collate all of these diverse links and messages into 1 page, as fast and easy as possible, make it hassle-free to add stuff to it, maybe some messages, change the order of the links etc. In some systems this is called the Dashboard. You can make one in a few minutes using: 1.) Admin Custom Pages 2.) ready.php in your site folder Steps: Install ACP create a file inside templates for your dashboard (e.g. _ac_dashboard.php). Create your dashboard page below the admin branch of the page tree, assign it to ACP, and set the template to use to the one you created. This example will display a table of quicklinks. Contents of the dasboard file: <?php wire('modules')->get('MarkupAdminDataTable'); ?> <h3>Title of site here</h3> <div id='ProcessFieldList'> <table id='AdminDataTable1' class='AdminDataTable AdminDataList AdminDataTableResponsive AdminDataTableSortable'> <thead> <tr> <th>Item</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td><a href='<?php echo $config->urls->admin?>blog/'>Blog</a></td> <td>Filterable/Searchable listing of blog posts.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>news/'>News</a></td> <td>Filterable/Searchable listing of news items.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>projects/'>Projects</a></td> <td>Filterable/Searchable listing of projects.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>page/'>Page Tree</a></td> <td>A hierarchical listing of the pages in your site.</td> </tr> <tr> <td><a href='<?php echo $config->urls->admin?>settings/'>Site Settings</a></td> <td>Global site settings</td> </tr> </tbody> </table> <script>AdminDataTable.initTable($('#AdminDataTable1'));</script> </div><!--/#ProcessFieldList--> You only need this if you want to redirect logins to the dashboard: add to ready.php (where 1234 is the ID of your dashboard page): if($page->template=="admin" && $page->id == 2) $session->redirect($pages->get(1234)->url);
-
yes, good point... would be keen to see it. Mostly though, i never seem to be able to use stock systems, because the business logic is hard to encapsulate into one system, which is why if you build this with PW backend, then you are really tailoring it for specific use; I also say this because i just alighted from a 200+ hr asp.net project (where my part was only a fraction of the total labor) in building a custom app, and never a day went by when i observed how so many of the things we needed to constantly build and rebuild and fix could have been handled simply by pw admin;
-
@FrancisChung, perhaps I'm misunderstanding this, but I think you are saying they are pasting markup into an RTE? That could never work under any circumstances, because RTE means rich text, not markup. If they want to paste in markup, they would have to first click the code view button.
- 10 replies
-
- 1
-
-
- HTML Entity
- HTML
-
(and 2 more)
Tagged with:
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
Macrura replied to kongondo's topic in Modules/Plugins
In my case i only have 1 field and then my code checks for which template it's on, then outputs various buttons and messages; the buttons themselves just link to templates that read the url parameters and run some process. Eventually i'll probably have a generic module to process the buttons.. i think I'm going to be using this a lot! -
Module Module: RuntimeMarkup Fieldtype & Inputfield
Macrura replied to kongondo's topic in Modules/Plugins
This is such a great module; recently I used it to create custom action buttons on my calendar/futuremail app; Send or preview the email message for the future mail: send or preview a calendar event, which is typed by a chosen template (e.g. event, lesson reminder, etc.)