-
Posts
601 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Frank Vèssia
-
Ah thanks
-
Apeisa, it works! But why? I mean, using $this should work also...before making a massive find/replace is there a way to make it works with $this?
-
For switch language i use this code <?php $user->language = $languages->get("default"); list($languageName) = explode('.', $config->httpHost); $languageName = $sanitizer->pageName($languageName); switch($languageName){ case 'en': $user->language = $languages->get("en"); setlocale(LC_ALL,'en_EN'); break; default: $user->language = $languages->get("default"); setlocale(LC_ALL,'it_IT'); } inside my template, for example home.inc i simply echo this <?php $l_search = $this->_("Search"); ?> <div><?=$l_search?></div>
-
I'm facing a strange behavior in my website. When switch from default language (it) to english, only the fields are displayed correctly in english, not the texts in my template files. I have severals files loaded in the translation admin, all translated, but the text remains in it. Where i'm wrong?
-
thanks Ryan, I will implement this solution and let you know about performance
-
Any news Nico ?
-
Great module, when you have time please fix the link to twitter dev on the module page
-
I'm running a website with thousand of photos. Each photo can be commented, receiving Likes and Favs. I display likes and favs pretty much like 500px.com with 2 lists of the users. I started caching these lists and of course now i have thousands of folders for the cache. Can i have some problems in the future with that? It's ok to using cache for part of massive contents like photos/videos/products or it's better to use cache only for single common content ?
-
Thanks guys for the replies, i was thinking about performance in terms of time for getting the page, maybe using "template" or other fields in addition to the ID was faster for PW to get that page because its' like: don't search in all pages to find that ID but search only in the pages having that template....but i got the point
-
Maybe it's a stupid question but I'm wondering what's the best selector between $pages->get($pageID); $pages->get("template=book,id=$pageID"); Assuming i have thousands of pages it's better to filter also by template (or other fields) or not, in terms of performance ?
-
Sometimes i use a "special" hidden page as control panel for some website options i want to have as variables, i create custom fields for this "settings" template and a page on top of the tree. Every time i need this variables i call the page from api $settings and i use it where needed, like $settings->replyEmail (text) or $settings->siteLive (checkbox) etc... Could be very nice and useful to mark this template as "menu link" and accessing this page from the main menu, maybe under Setup or as indipendent new voice, now i forced the admin template to have this but can be an option of the template or maybe of the page.
-
great! Thanks Ryan
-
I tried to add the first line of this code with the other ini_set of the index.php file....no luck ini_set('session.cookie_domain', '.mydomain.com'); ini_set('session.use_cookies', true); ini_set('session.use_only_cookies', 1); ini_set("session.gc_maxlifetime", $config->sessionExpireSeconds); ini_set("session.save_path", rtrim($config->paths->sessions, '/'));
-
Tried the first solution with no luck...
-
Hi, I'm using a code to create fake subdomains that are pw pages. RewriteCond %{HTTP_HOST} ^(page1|page2|page3)\.example\.com$ RewriteRule (.*) /main-page/%1/$1 The code works pretty well but when i browse the subdomain i lost the session if i'm loggedin. Any idea to avoid this problem?
-
error in selector: unknown column in where clause
Frank Vèssia replied to valan's topic in General Support
Any news ? I got the same error today.. -
Thanks guys, even it's not the best practice I'll do it via sql, i'll do just one time for the import, it's a waste of resources creating another field, especially after the import the new articles will use default field for the date.
-
Hello, i'm in the process of migrating and old Drupal website into PW. I'm pretty done but my only problem is the "created" field. I would like to edit this filed during the import to match the old existing date content. It's possible? I've tried with $article->created=$oldDate but i guess this field it's read only. I know i can create another custom field and using this one but could be nice using the default one.
-
Thanks
-
Hello, it's possible to access at response of login throttle module to show messages on custom login form?
-
@wanze, thanks but of course I know that... the problem is not here...before changing hard disk the code worked good...
-
Today i changed the hd on my server, from a sata2 to an SSD. Now I'm experiencing some errors from PW likes: Error Call to a member function size() on a non-object coming from this code: <? $others=$pages->find("template=profile,sort=-created,limit=8"); foreach($others as $p){ if(!$p instanceof NullPage){ $thumb = $p->images->first()->size(104,104)->url; echo "<a href='/{$p->name}/' class='profilemini' rel='nofollow' style='margin:6px'>"; echo "<img src='{$thumb}'rel='tooltip' /></a>"; } } ?> I tried to check the php config but I really don't know why i got this error....the only thing changed is the php version from 5.2 to 5.4... edit: mmm making some test i figure out the problem is here "sort=-created". With this, the result of the query is null for this reason inside the loop i got the error. Some database issue??
-
-
Thanks Nik
-
@WillyC: I didn't understand anything but adding the trackChange now the code works. Thank you so much!!