Jump to content

horst

PW-Moderators
  • Posts

    4,077
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. I don't know exactly how you need your data to be organized, and how you import it, but I think best way would be if it is possible to import it in several steps. Maybe, that's exactly what you are said / asked me, - You need to do the import completly new. Here is the way hoa I would do it: First import or create all categories, create a parent page, e.g. like with the countries example, create the countries template and page. Then create the child template and import all items as children of the parent page. Repeat this for all other categories! (name, owner, country, dimensions, construction dates, construction methods, etc) If your categories are ready, you need to create the fields and templates (incl. template file(s)) for your main data pages. Also this will have one or more Page-Fields for the categories. When importing a record of the main data, you need to assign a category by a page field. If you can provide some informations about the data that you need to import, we can provide further help / assistance with an importer script. Is it in CSV file? Is it in a mySQL-DB or is it a mysql.dump? Can you provide at least one record with example data and all the fieldnames? Maybe it is also possible to import all at once, but therefore we need some more informations. Horst
  2. Hi @joe_ma, not sure on this, but have you checked if this has nothing to do with copy pasting data from anywhere else into the textarea field? Or the otherway round: this behaves the same if you type manually the String "Tel. 044 461"? I haven't investigated further, but I'm wondering if the PHP entity encoder makes differences between spaces that are wrapped from numeric chars and spaces that are wrapped only from alpha chars or mixed alpha-numeric chars.
  3. Have a look to the module SPEX. This is a very comfortable, more advanced and flexible ready to use system for that. It already has all the functionality for as many of layout-templates, Slots and more as you want to use. It is in the modules directory, the author is Jonthan Dart.
  4. Hi Tony, have only a bit time now, but think I definetly can explain how to get this part with the page-fieldtype sorted. Best thing would be to start with a simple step by step solution: in admin, create a template without a file, called country and let it have only the title field. Save! create a second template, called countries (plural / multiples of country), only assign the title filed to it and: Save! go into your page tree and create a single page named countries, with the template countries, now add children to this page, all of them should have the template country, ok, now go into fields and create a new field of type "page", name it countries. In the Input tab of it, go to Selectable Pages, use Parent of selectable page(s) and click the change button you get the admin page tree now and have to go to your previously created countries (parent) page. Click select to select it! additionally to that, go to Template of selectable pages(s) and use the dropdown to select country, (the single page template) Now you can go to Input field type and select one that fits best your needs. For this example, please select the AsmSelect* ok, ready to save the field! Now go to a template where you want to be able to select countries or one country, - add the new created field "countries" to it and save. Open a page with that template or create a new one that bases of the template that now has the page field countries included. Go to the field and play around with it! You got it now? Go ahead and edit your countries field: under the Details tab select: Single page or empty page ... (this will restrict the field to let the user select only one child out of all available) if you don't like the AsmSelect, go to Input tab and select another one, best would be Select now? save it and test your changes. Come back here if you don't get it i to work.
  5. There is a module in the directory, called "Simple Contact Form".
  6. I don't use it continuously, but when I need it, I save it with my primary "good for everything editor" NoteTabPro into Outlinefiles, or into an editors own format. This can be done easy within an editors sidebar.
  7. as I know and understand the access rights in unix (and other) systems, the parent directory need write access. The parent directory for most PW installations is the webroot! Besides that in many shared environments you will not be able to change access rights for the root directory, I also wouldn't do that if I could.
  8. the ready.php is a new thing, introduced in the current 2.6.7 DEV branch. If you are running PW with a lower version number, it isn't usable then. read more in the blog post here: https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/
  9. Sounds good at first, but would need write access to the root directory for webusers, what, I think, isn't acceptable for that little comfort. Just my two cents.
  10. if you want to search the forum for interesting things, best is to use google with a search like this site:processwire.com/talk -"Viewing Profile" fieldset The part site:processwire.com/talk and the -"Viewing Profile" part are what I use every time, appended with my searchterms I actually looking for. If you use this, you will get many useful links like: https://processwire.com/talk/topic/1057-template-editor-fieldset-indentation-and-checkbox-columns/ https://processwire.com/talk/topic/176-fieldsetopen-fieldsettabopen-%E2%80%93-what-is-it/ https://processwire.com/talk/topic/665-editing-fieldsets/ https://processwire.com/talk/topic/7608-fieldset-grouping-in-admin/ The ip.board searchfield is not helpful. You can also use the google serach with /docs/ instead of /talk/, if you want to quick search in API and other docs. Happy reading!
  11. Not 100% sure, but besides the default admin theme, the RenoAdminTheme, that is shipped with the PW core, seems to be the only public one at the moment. But there are also possibilities to only change the colors of those Themes or to fork and slightly modify them. For this, please refer to some threads: https://processwire.com/talk/topic/7625-reno-theme/ https://processwire.com/talk/topic/7238-release-apertusadmintheme/ https://processwire.com/talk/topic/8226-my-backend-redesign/
  12. The fields modified and modified_users_id are in the table pages. If there is no direct API based way to manipulate it, one can read the values before a page is updated via the lazycron script, and set the values back afterwards, via direct access to the DB table. But I highly recommend to read this (complete) thread: https://processwire.com/talk/topic/8188-edit-created-and-modified-date/
  13. Many hostings operate with different data centers in different locations or around the globe. Here are a view few of them: http://www.eleven2.com/ http://www.hostsg.com/ http://www.site5.com/ http://www.vps.net/
  14. without looking into the code, - maybe it will work when you select the array of items as formatted return value, under FIELDS -> images -> Details -> Formatted Value. (?) BTW, this module is in alpha state. ;-)
  15. only some thoughts: what are the settings for upload_max_filesize and post_max_size for PHP? (maybe you can change them in the .htacces file if you have no access to the php.ini, or you can use the php function ini_set to change them) what module is it? Does it have settings for max filesize, that maybe gets reset to default on the live server? does the form, that is used for upload, have a HTML5 setting for MAX_FILE_SIZE ? <input name="MAX_FILE_SIZE" value="1000000" type="hidden" />
  16. I like your post and what you have said. But here, the situation seems to be a bit difficult. Have you read the more than 50 posts that the cssabc123 user has posted here in the last 5 days? I remember moments when I came to the forums and have had a look to the "Recent Posts" Box that was full with only his posts. I understand this box as a way to get quick recognition, what is useful for new announcements or people who need "emergency" help. I can't remember a time where only one person has flooded it completly alone. (And there were times where I was online every day here)
  17. @LostKobrakai, yes its definetly clumpsy, it is a solution from my early PW days where I wasn't able to inject buttons into the admin and I believe the ready.php wasn't introduced. Your code is the perfect, none-clumpsy addition to the bootstrap-sorting-script.
  18. Hi Hanna, I have used another approach on a site with many images where the user want his images sorted in alphabetical order only initially, but want to be able to reorder them manually later on a bit. Maybe this sounds a bit clumpsy now, but we have added a link for the imagesorting to the frontpage only for superusers or imageauthors, like with the common edit-this-page link in PW's default site-profiles: if ($page->editable()) { // add edit link(s) to it, if the current user has edit rights $s .= "<li class='left'><a id='editpage' title='diese Seite bearbeiten' href='" . wire('config')->urls->admin . "page/edit/?id={$page->id}'><i class='fa fa-edit fa-lg'></i></a></li>\n"; if ('gallery' == $page->template) { // add an imagesort-link to it, if it is a gallery page $s .= "<li class='left'><a id='editpageSortimages' onclick=\"return areUreallySure('Bilder für dieses Archiv ({$page->archivnummer}) jetzt alphabetisch sortieren?');\" title='sortiere Bilder alphabetisch' href='/pwSortPageimages.php?id={$page->id}'><i class='fa fa-sort-alpha-asc'></i></a></li>\n"; } } So, from the backend the user has to click on the view button first, then in frontend click the sort-my-images button, which calls the following bootstrap-script which resides in the pw root (pwSortPageimages.php): <?php // define userroles that are allowed to work with this script, like: superuser|editor|author $userRolesSelector = 'superuser|publisher|author'; //-------------------------------------------------------------------------------------------// // check if we have got an id $pageId = isset($_GET['id']) && is_numeric($_GET['id']) ? intval($_GET['id']) : false; if (false===$pageId) { header('HTTP/1.1 403 Forbidden'); exit(3); } // bootstrap PW require_once(dirname(__FILE__) . '/index.php'); // check user-account $validUser = false; $roles = explode('|', $userRolesSelector); foreach($roles as $role) { if (wire('user')->hasRole($role)) $validUser = true; } if (!$validUser) { header('HTTP/1.1 403 Forbidden'); exit(2); } // check if id points to a valid page $p = wire('pages')->get($pageId); if ($p->id != $pageId || 'gallery' != $p->template) { // check for a valid page id and also if the template matches the a gallery page header('HTTP/1.1 403 Forbidden'); exit(1); } // now we reset the order for the images field (change the name of your field if it is not named: images) $p->of(false); $p->images->sort('name'); $p->save(); // and redirect to the page edit screen $url = wire('pages')->get(2)->url . "page/edit/?id=$pageId"; header("location: $url"); exit(0); This way the user has to click two times more if he want to sort his images in alphabetical order, but it gets only triggered on demand, plus the user can reorder them afterwards. The link to start the sorting can also be injected into the admin-editscreen, what would be a bit nicer and saves one click.
  19. Thanks for reporting this and the part reported by @Juergen.
  20. I have two questions: What PHP version do you use on that server? and: Why do you use this format with double-qoutes wrapped with single-quotes? '"50%,40%"' or: Have you also tried it with only one of them, (only single-quotes and / or only double-quotes)?
  21. Hi Gideon So, unfortunately I haven't followed / used the Image Manager project since a long time. But in the meantime there was an EXIF-module contribution from @nico. Maybe this is of help for you: http://modules.processwire.com/modules/image-exif/ It adds an EXIF property to the image API call and let you retrieve all sort of EXIF informations.
  22. For me it is also not working. I have changed it to: protected $_pathToTemplates = '/templates/'; This is also working under windows. The \ (backslash) in windows only is necessary if you execute shell commands. Otherwise the forwardslashes are converted magically by PHP. See also: http://php.net/manual/en/dir.constants.php or here: http://alanhogan.com/tips/php/directory-separator-not-necessary
×
×
  • Create New...