-
Posts
212 -
Joined
-
Last visited
Posts posted by Manaus
-
-
Ahh! The magic! Usually I do not cosider it as often as I should...
Thanks @bwakad && @martijn !
-
Hi,
just trying to clear knowledge so far.
I have a template with a "utenti" users field.
I can get the desired pages with$pages->find("template=xx,utenti=$myuser")
But using the api I have to do
if ($page->utenti->has($myuser)) ...
I have trouble understanding the differen for the same expression has and =, why not using *= (contains) in the selector? Or $page->utenti = $myuser?
Thanks -
Hello,
I need to store the pages a user has seen within a field, I'm currently using json_encode(pages array) to store the pages list within a textarea field, but I wonder if there is any better way. JSON use with javascript / ajax / php is making my code a bit bloated, and I'm starting to lose track of the overall design of my app. Is there any better way to keep track of those ids?
Thanks for any suggestion!
-
Hello,
I have a page which is loading three times the same page, with different parameters.
This is the code for the called page
if ($config->ajax) { header("Cache-control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); } if ($input->post->proj) { $progettocercato = (int) $input->post->proj; $progettocercato = $pages->get($progettocercato)->child("title=Comunicazioni")->children("utenti=$user"); // foreach .... // print records etc
For three calls I get 5, 12, 15 seconds of response time (screenshot) on localhost
The page is called through an $.ajax function.
Is it standard ajax behaviour, or am I doing something unnecessary?
Thanks!
-
Thanks for the detailed answer!
-
Hello,
a client of mine wants to allow file uploading of these extensions:
jpg, jpeg, gif, png, tiff, bmp, pdf, csv, txt, rtf,doc, docx, xls, xlsx, ppt, pptx, mpeg, mp4, avi, divx, wmv, rar, zip
Are there security risks with a specific format? Other indications?
Thanks!
-
Thanks Raymond (nice picture!),
I think the cached page is the caller, not the ajax stream...
-
Hello,
I have a page making ajax calls, but when I go back and forth with the browser I see just the cache content. Is there any way to prevent this?
I tried with all the meta tags available on the market today...
-
Could be sorry, don't know how to change board...
-
Hello, I'm trying to set up a 'keep me logged in' system upon user authentication, but after reading the suggested methodology -- http://stackoverflow.com/a/244907/1981613 -- I feel a little lost.
Is there any module for helping such feature?
Thanks!!!
-
Hello,
I need to make a recursive function, for printing children of children of ... of pages.
I placed the function in a separate file, which I include.I get a "Error: Call to a member function get() on a non-object"
This is the code:function stampafigli($id) { echo $id; // prints 1478 $messaggi = $pages->get(1478); // raises error $messaggi = $pages->get($id)->children(); if ($messaggi->count): foreach ($messaggi as $m): if($m->id): echo "$m->body" . PHP_EOL; stampafigli($m->id); endif; endforeach; endif; }
Thanks for any suggestion
-
Thanks Adrian and Martijn!
I see the field it's a standard title field, with Html Entity Encoder (htmlspecialchars)
I guess I gotta change it...
-
Hello,
I have a page whose title contains a ' (single quote)
Now when I get it and send it as mail subject, I get ' which is quite uninpressive... I tried to convert it using html_entity_decode() but it's not working.
How can I deal with it?
Thanks!!
-
Thanks Adrian,
I thought about it, but each user has his view of the page, according to his last visit...
-
I stumbled upon this issue again, but it's getting curious developments...
It might happen that posts are often modified [adding or removing users from them], so the posts are now appearing 'new' quite often.
Is there another way to use a per-user state of the posts?
Just thinking: I might add a list of this-user-has-read linked pages to each post, and everytime the user reads the post, flag the checkbox.
Thanks for any suggestion...
-
Hello,
I have a series of parent pages which have $users, and a series of children pages which inherit such $users.
Now I'm making a template with a list of pages where I can toggle the users from the children pages.
I think I should get the users from the parent, and match against the values sent by the form (the form sends only checked buttons).
Remove all users then add the confirmed ones?...
Thanks for any suggestion...
-
Great, Wanze!
Tried following all the steps, but after Authentication I get a "Errore:invalid_client no application name"
What do you think it might be?
Thanks!!
-
Hello,
I have a page using this schema: /myhost/mypage/?p=1015
I would like to add pagination to this page, but I do not know how to configure the url: /myhost/mypage/page2/?p=1015/
should I use url segments? /myhost/mypage/1015/page2 ?
Thanks!
-
Hello,
I need to delete a cropimage field content [a single item field], tried $page->image->remove(), $page->image->delete(), $page->image->deleteAll() but they do not work.
Thanks for any suggestion...
-
Much love!
-
Hello,
I was [locally] tweaking with the code, just wanted to delete an image, I run $user->delete("avatar"). Done.
Can I update another user from the database to superuser role?
Thanks!
-
Thanks Horst,
what I mean is what is setMaxFiles for? I can't get it from the docs (indeed I think the Wireupload is missing from the API docs)
-
Hello,
I have the setMaxFiles(1) function in a script for file uploading, but the field is set to 3 for Maximum Files Allowed. Is there any conflict between the two? I guess the field definition wins, but why using the function then?
Thanks!
-
Hello,
I cannot completely understand the of() function.
The field is text, textformatter is, say, Markdown. On saving, I put markdown code, why the need of setting of(false) on writing? Why the need to format values in input?
Thanks!
-
1
-
Get the bunch of pages and children in one move
in General Support
Posted
Hello,
I need to grab the bunch of pages and their children, I wonder if I can do it in one shot, or do for each page "do you have children? if so, get them". My fear is in making too many db hits, and slow down the page load
Thanks!