Jump to content

huseyin

Members
  • Posts

    78
  • Joined

  • Last visited

  • Days Won

    1

huseyin last won the day on August 16 2020

huseyin had the most liked content!

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

huseyin's Achievements

Full Member

Full Member (4/6)

45

Reputation

  1. I am planning to create a Footbal Statistics website. The data for this website will be pulled with api requests to different endpoints. What i want to ask is which of the below methods should i use for better performance: Method 1 (Store only Json data in one field) Store whole Json package in one textarea field. $page->jsondata = (the whole json package); For output on the website read this one field like $fixture = $pages->find(...); and extract all needed data from the jsonpackae filed like echo "Home Team : ".$fixture->jsondata->response->fixture->teams->home->name." vs Away Team".$jsondata->response->fixture->teams->away->name; Method 2 (Store all data in seperate fileds. Nearly 100 fields.) Extract the Json Data and store each data in seperate fields, like; $page->home_team_name = $jsondata->response->fixture->teams->home->name; $page->away_team_name = $jsondata->response->fixture->teams->away->name; $page->save(); For output: $fixture = $pages->find(.....); and use it like this: echo "Home Team : ".$fixture->home_team_name." vs Away Team".$fixture->away_team_name; Sorry for my bad English hope you can understand the question.
  2. I have upgraded from 3.0.148 to 3.0.184. Tested a find proccess with debug timer. /news/ page has ~230.000 subpages. $pages->find("parent=/news/, limit=30, sort=-newsdate"). This proccess compleetes in nearly 2 seconds. $pages->find("parent=/news/, limit=30, sort=-newsdate, field=title") this in running around 6 seconds. field=title is only for testing. If i use more fields for autojoin then it is running even longer. Is this normal?
  3. The only funding possibility for Processwire now is (as i know) by selling pro modules. For selling more modules, Processwire have to be used on more projects. So it have to be more populer. In my country Turkey Processwire is not known at all. (Turkey has over 80 million people) Everone could put different effort in this undertaking. So my role is such an organisation could be to promote the use of Proceswire in Turkey. I would love to do this. I own a MsExcel Forum with nearly 300.000 members and this forum could be a good starting source for building a Processwire community in Turkey. --------------------- Edit : You would ask "why a separate community?" In Turkey the knowledge of foreign languages are is very low. So people are asking for Turkish documentation, examples or explanation. Therefore a local community would have larger members count.
  4. As a novice user i had my problems understanding how multiple file/image upload works and how to delete only one selected uploaded image and not to delete all. It is very difficult for a novice user to understand the complicated examples and answers of the very experienced members. So i decided to make a very simple example for explaining the multiple file/image upload and selected delete. I am not an expert on Processwire, wanted only to share what i achieved so far. So there may be better ways to do the same. (Take this as an axample form a novice for other novices) WARNING : As this is only a very simple example; there are no validations and security checks in this example. So please dont use this on a real project without security checks etc. The attached fileexample.php is complete working example. (I made some last minute comment additions, hope i did not destroyed anything. If you have problems using the example file please inform me, i will check and correct) With this example you will be able to; - upload multiple images - delete only selected images you uploaded before. Especially for the second part (deleting only one image from a multiple image field) it is very hard to find examples and answers in the forum HOW TO USE THE EXAMPLE FİLE: 1- Create a TEMP directory for for fileupload below site/assets/ 2- Download the attached "fileexample.php file and edit line 24, write the path of the created fileupload temp directory. 3- Upload the "fileexample.php file to site/templates/ folder 4- Create an new field named "images" with type of images. 5- Add a new template. Choose "fileexample" from the recommended list. 6- Edit the "fileexample" template and add the created "images" field from step 4 to it. 7- Create a new Page and select "fileexample" as the template of this page. Now visit the newly created page and you will see 5 image input fields. It is possible to use only one inputfield, but it is more visual the way i choose in the example. The flow of the example is like this; When you visit the page the form is created. If there are already uploaded images the thumbnails are shown and a "Delete" button next to it. If there is no image than a image input is shown. As we used "$imageamount = '5';" if there are 2 images already uploaded you will see 2 thumbnail iamges with delete buttons netx to them and 3 image inputfields. If you choose some images on the image input fileds and hit the "Save" button than the code part starting with "if ($input->post->fileprocess){" is triggered. This part makes the file upload process. If you click the Delete button next to one thumbnail the script "deleteimage" is trigered. This script makes a ajax Post call the same page with the post variable "imagedelete". This ajax call sets "imagedelete" variable and so the code satrting with line "if ($input->post->imagedelete) {" Will be trigered. Here the most important part is the exit in the last line. As this is a Ajax call the call have to be terminated before anything is outputted. ----------------------------- Hope all is clear understandable. My English not so good, sorry. If you do not understand any part please ask and will do my best to explain it again. fileexample.php
  5. Is there any module or possibility for editing (blur, draw lines/rectangles/circles) images in place at the backend (like we do crop, rotate) in place.
  6. There are always discussions how PW handles heavy sites. I redesign our webpage www.kentvitrini.com (Turkish City Portal -> News, events, directy etc) This page has now 49.500 news entries. On the left you see a list of states. If you click on any state then you see list of cities on the left . The numbers are the news count under each state or city. State and City names are UrlSegments in the url. In real it is whole running on the Home page but gets filtered by UrlSegment1 = State and UrlSegment2 = City. The news are pulled from a turkish news agency's RSS every 30 minutes with Cronjob. So the news list increases 1000-2500 news every day. This is not the final design and functionality. I put the site online to get Google indexes the pages. I am still working on the site. There will be a Company Directory, Events system and a ads system etc. I wanted to only shere to show you the performance of a website with 50.000 pages running on PW . Please note that i get 94% PageSpeed Score on Gmetrix without Google ads. So theese ads are slowing down the website. With ads i get only around 70% Score. P.S: This is not a Showcase post yet. so did not post it to the Showcase section. When it is totaly ready then i will share it there again.
  7. So sorry. while checking i realized the field was "file" instead "image". Corrected this and it works now. Sorry again and thank you for your effort.
  8. I have 2 fields one is single item, the other is multiple items. With the single item field it works. But i need also the other multiple items field and with the multiple items field it should work also..
  9. Hello, i use PW 3.0.148 0n local XAMPP. It works like this when i have single image field : $page->image->size(z,y)->url But as soon as i have multiple images field and add "first" or "first()" or "eq(0)" than i get no output. ERROR : $page->image->eq(0)->size(z,y)->url WORKS : $page->image->eq(0)->url Can anybody reproduce this and find the reason?
  10. Any comments about this CSRF problem. (see former message) Can anybody reproduce this?
  11. I wanted to test the CSRF Validation. Have PW 3.0.148 running on local XAMPP. Installed the LoginRegister Module. While Profile edit i changed the token and/or value of token on the form. After submit no error no exception. The edited value was accepted. On line 895 is coded : $session->CSRF->validate(); (Which should throw the exception, but did not) If change this line from "$session->CSRF->validate();" to "echo $session->CSRF->validate();" than i get the exception as admin errorpage (See attached) . Can someone test the same?
  12. There is not much information. You say "I am working on a website". At which state are you? What is your experiance with Processwire? You may get more targetted answers if you ask steps for only a part of your project instead of the whole..
  13. As i mentioned before; I started my own e-commerce project and had to say i was afraid at beginning. This is my first OOP project, so i spent some time to find my way. But i am very happy when i see my progress and the results step by step... It will surely not as future rich as Padloper but my clients do not use many futures anyway. Mainly the general things.... Hope to present my first Ecommerce project on PW here soon....
  14. The key would be the "page-edit-created" permission. Read : https://processwire.com/blog/posts/language-access-control-and-more-special-permissions/#limit-edits-to-pages-user-created-page-edit-created
  15. Without further information it is like "fortune telling" Test your database connection.
×
×
  • Create New...