Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - sweetman

1
Questions / Problem uploading image
Hello all,
this worked fine until today, and no change to app or server in the last few months.
The problem: when I upload an image the progress bar over the thumbnail do not change to the checkmark.
Tried various image formats but no change.
Then I changed the image size and then it worked.
Is there any limitation to image upload (except the size you specify when building the app)?
TIA
tony
2
Bugs / still no fix for chart colors?
Hello all,
charts without colors or with a single color are unusable, actually.
Is there a manual fix for this?
I badly need this.
Thanks
tony
3
Bugs / Bug in search results page
Hello all,
when I search for a term in a list view, something strange happens:
Before searching my URL is:
Code: [Select]
https://www.mysite.it/admin/registrations/
but after searching for something:
Code: [Select]
https://www.mysite.it/admin/registrations?search=something
Please note the missing SLASH.

Since in the list view there are image fields that point to a relative folder, image are missing until you change the URL to look like this:
Code: [Select]
https://www.mysite.it/admin/registrations/?search=something
(added the SLASH after "registration").
Once you add the SLASH images reappear.
Is there a way to fix this? Which file should I look at?
TIA
tony

4
Questions / How does multilanguage work?
Hello all,
one of my customer asked me to make the application interface multilanguage.
But how does the multilanguage option work in the project settings?
Or, is there a way to make a copy of a page (example: "copy of list page") and link it to another page (example: "copy of edit page")?
Or have I to create a new whole project and publish it somewhere else?
TIA
tony
5
Questions / [ADD RECORD PAGE] how to reference field from joined table on email
Hello all,
I need to send an emal after the user add a record to the application.
Actually I use the "Mail Actions Settings" to send the email.
I know how to reference the current record fields using the $modeldata[my_field] variable.
But how can I reference a value that is related to another table?

I.E.:
In my form I have a select field that gets values from another table.
So, my select looks like:
OPTION 1 (value: 1)
OPTION 2 (value: 2)
... and so on.

How can I reference the "OPTION 1" value instead of the "1" value in the email?
Is there a way to query the related table and get all fields from it?
TIA
tony

8
Questions / bar chart - how to sort and order correctly date by day?
Hello all,
I need to display registered users by day on a bar chart.
I can get the chart done, but the sorting is wrong.
I need to display the last 10 days in descendend order but the Mysql LIMIT function displays only the FIRST 10 records See image:

https://imgur.com/a/RwNZuuK

But how can I display the chart in reverse order (most recent on the right?)? Like this pic:

https://imgur.com/a/tUhXtzL

This is my MySQL code:
Code: [Select]
"SELECT  COUNT(r.privacy_reg) AS registrati, DATE_FORMAT(r.data_registrazione_reg, '%d/%m/%Y') AS data FROM registrazioni AS r GROUP BY data ORDER BY r.data_registrazione_reg DESC limit 10"

CAn someone help me?
TIA
tony

10
Bugs / Error 500 with checkbox and SingleSwitch using 0 and 1 values
Hello all,
I can't make it work using a Checkbox and SingleSwitch option using values different than 'true' and 'false'.
I have a field that should be 0 or 1.
If I set the field as Checkbox and set is as SingleSwitch, setting CheckValue to 1 and UnCheckValue to 0 I get error 500:
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'false' for column `my_db`.`stores`.`approved` at row 1

Please note the 'false' value in the error. Where it is coming from?

Is this a bug?

As a workaround I've set this field as SELECT.

TIA
tony
11
Questions / How to create a pie chart?
Hi all,
I would like to create a pie chart about a table but I cannot make it to display anything.
The table contains registered users. The user record has an "active" field.
The "active" field can be 0 or 1.
I would like to display a pie chart about regitered users (the whole pie) and a registered and active users (pie slice).
But I cannot understand how to select the correct data.
I can succesfully create bar chart.
But is there a tutorial about pie chart?
TIA
tony

12
Questions / Empty date fields display current date time
Hello all,
I have some datetime fields in my db.
I use the FormatRecordField (--format_date('Y-m-d H:i:s')--) to format the dates as I need them.
It works but all fields that are empty display the current date time. Why? They should be empty.
Is there a way to format the date only on non-empty fields?
TIA
tony
13
Questions / How to hide/remove the "Change email" link from user profile?
Hello all,
I would like the user to view only his profile data (username, password, email...) and not be able to change anything.
I'm almost done, but there is the "change email" link still visible. How can I hide it? Is there a way to hide/remove it without hand coding?
Is this a bug?
TIA
tony
14
Questions / [SOLVED] project menu and user roles problem
NEVER MYND, I solved this setting the link of the MYMENU1 and MYMENU2 items menu to the first submenu they contain.

===========
Hello all,
I have a project menu that should display contetnt based on the user role.
This works as expected when the project menu doesn't contain sub items in submenus.
Example:
Code: [Select]
mymenuotem1.1 (administrator)
mymenuotem1.2 (administrator)
mymenuotem2.1 (user - administrator)
mymenuotem2.2 (user - administrator)

This way, administrator menu items are hidden when the user logins, while the administrator can see them all.
this is Ok.

But then I would like to organize better my menu and create something similar to this:
Code: [Select]
MYMENU1
- mymenuotem1.1 (administrator)
- mymenuotem1.2 (administrator)
MYMENU2
mymenuotem2.1 (user - administrator)
mymenuotem2.2 (user - administrator)
Since the MYMENU1 and MYMENU2 are not part of the role permission, the MYMENU1 displays even when the user logins. It doesn't contain any sub-menu, anyway.

My question is: is there a way to hide MYMENU1 when the user logins?

Thanks in advance.
tony
15
Questions / LIST PAGE: how to set a field as file and display as image?
Hello all,
I'm building a record management based on existing database and uploaded files.
There is a field that contains a filename (myfile.jpg).
I would like it to show as image in the LIST PAGE. But how?
If I set the field as FILE, there is no file path option.
It seems the only solution is to use CUSTOM instead of FILE and write the code manually.
Please note this project do not need ADD/EDIT or DELETE pages.
Any suggestion?
TIA