-
Posts
94 -
Joined
-
Last visited
Everything posted by evan
-
Yep, that's what I wanted to do. Wow, totally amazing! Thanks so much Ryan! It works perfectly on my end.
-
Hi all, I have a website that has Pages with text and Page fieldtypes. Is there an elegant way to search both of them (in this case, the Page titles of the referenced pages) at the same time for a search string? Doing a search of the Page titles and bodies is easy enough: $my_textual_results = $pages->find("body|title%=$query, sort=-posted, limit=10"); And of the referenced Pages, too: $my_referenced_pages = $pages->get('/referenced-pages/')->find("title%=$query"); $my_referenced_results = $pages->find("referenced_pages=$my_referenced_pages, sort=-posted, limit=10"); Now how do I combine these two search queries into one? I tried an 'or' operator between the two different search parameters: $my_referenced_pages = $pages->get("/referenced-pages/")->find("title%=$query"); $total_results = $pages->find("body|title%=$query | referenced_pages=$my_referenced_pages, sort=-posted, limit=10"); ...but that didn't work. Any ideas? Thanks! -evan
-
Did this ever make it to the master 2.2 branch? Doesn't seem to be working for me. Thanks! EDIT: Oops, thought I was supposed to type out newlines, looks like it just recognizes them. Works great!
-
All right, looks like it was my mistake. Including the jCart PHP into config.php does work, if you move the initialization code to the head of your template, which is this bit: // Initialize jcart after session start $jcart = $_SESSION['jcart']; if(!is_object($jcart)) { $jcart = $_SESSION['jcart'] = new Jcart(); } ...and also remove jCart's session_start. Sometimes you just gotta take a break!
-
OK, I made a little headway. jCart appears to work fine if I comment out @session_start() in the __construct() of the Session class, and let jCart declare it. However this breaks the PW login, as it reports that the login is forged. The problem seems to be where session_start() is declared, and when the jCart object is defined. Because the object declaration for jCart is happening after session_start(), jCart can't create the object and store it in $_SESSION. So my new question is, where is a good place to define an object before PW starts the session, and that's accessible to templates? Thanks for bearing with me, folks!
-
Hi folks, Anyone have any luck getting jCart and PW to play nicely together? I can't for the life of me figure it out. I know that it's a session_start issue, as everything works fine if I bootstrap PW after including jCart, in a normal PHP page. How can achieve the same effect within a template? I've tried including jCart in index.php, config.php, and Process.php, but jCart still can't seem to retain its session data. Thanks for your help! -evan
-
I've tried making these suggested modifications without success. Could someone share the module version? This is exactly what I was looking for. Thanks guys! EDIT: tried it again and it works now. Nevermind!
-
Thanks Ryan!
-
Hi, I was playing with the Page Search module, and tried changing the "Default field names to display", but nothing seems to happen -- the search results still show the default title and path. Is this a bug, or am I missing something? Thanks! -evan
-
No problem! I'm glad I'm not the only one who's learning...makes me feel less embarrassed about asking questions!
-
OK, figured it out: public function init() { $this->session->addHook('login', $this, 'on_login'); } public function on_login (HookEvent $event) { if ($this->user->hasRole("editor")) { $this->session->redirect($this->pages->get(1065)->url); } } Thanks ya'll!
-
I don't mind the existing login page, I just wanted to change what they land on. How exactly would I hook into $session->login? The whole hooking concept isn't really clear to me, or at least what is hookable and what is not. Thanks again.
-
This is unknown territory for me...I assume you mean something like this? public function init() { $this->addHook('ProcessLogin::afterLoginRedirect', $this, 'helloTest'); } public function helloTest (HookEvent $event) { echo "Hello!"; } ...which didn't work for me.
-
Hi, Is there a way to specify the default Page which appears upon login, either by role or user? I've made a custom admin Page I'd like to appear instead of Pages. Probably am overlooking something simple... Thanks! -evan
-
Quick question -- is it possible to automatically import a CSV file from a specified URL, using this module's functions and Lazy Cron? I couldn't figure out how on my cursory glance over the module's code. I'm trying to see if this would be suitable for updating an online inventory, or if I'd be better off rolling my own solution. Thanks!
-
solved new user role can't publish...must be missing something.
evan replied to evan's topic in Getting Started
Looks like it works on my end now. Thanks so much!- 19 replies
-
solved new user role can't publish...must be missing something.
evan replied to evan's topic in Getting Started
OK, I think I figured it out, but I don't understand why it worked. On the template I had specified a single children template, and I removed it. Now the user's able to publish. But I tried adding the single template option again to see if it would disallow publishing again, and it still allowed the user to publish. Maybe it had something to do with the "change template" permission, and when I added the role? Very weird! Nevermind! Forgot I had the superuser role assigned. At least I know this issue is repeatable and I didn't just miss something.- 19 replies
-
solved new user role can't publish...must be missing something.
evan replied to evan's topic in Getting Started
Another weird thing is that I've tried enabling all the permissions on this particular role -- which is the same as superuser, correct? -- and it still doesn't let me publish. I double-checked that user's role is correct, so it ain't that kind of mistake....must be some other dumb thing I'm missing!- 19 replies
-
solved new user role can't publish...must be missing something.
evan replied to evan's topic in Getting Started
Well, nothing changes on the template access side...it still just shows the view, edit, create, and add children options. Should there be another option? Do I need to do anything more than add a "page-publish" item in the permissions settings, and select it in the appropriate role?- 19 replies
-
solved new user role can't publish...must be missing something.
evan replied to evan's topic in Getting Started
I tried that too...no dice.- 19 replies
-
solved new user role can't publish...must be missing something.
evan posted a topic in Getting Started
Hello, Somehow I can't seem to get a new user role to publish new pages -- only create and save unpublished. I created a new role called "editor" with view, edit, delete, and move permissions. I also allowed access management on the appropriate template. Still nothing. What am I missing? I'm using PW 2.2. Knowing how this goes, I'll probably figure this out in a second or two...! Tempting fate, -e.- 19 replies
-
Ack, yet again I find my answer immediately after I post it. Sorry folks! Feel free to delete this thread.
-
Hi all, My $input->get variables only resolve when I have a trailing slash before the question mark (i.e., "hello.com/?var=1"). Also, $input->URLSegment1 gives me a 404. I figure these issues are related, and have something to do with my .htaccess config, but I can't seem to figure out what. On another note, it's very difficult to search for PW variable-specific problems on this forum, as search terms like "input" and "get" aren't allowed. Apologies if this has been addressed before. Thanks in advance! -e.
-
Ah, thanks! I figured it was something simple, and couldn't find it via search.
-
Hi all, Has anyone noticed a weird A-circumflex (http://en.wikipedia.org/wiki/%C3%82) appearing in their TinyMCE field text? It seems to happen after hyperlinks, and if I double-space before a sentence. It only shows up when it's rendered -- it doesn't show up in the HTML view in TinyMCE, but does on the HTML page. I thought it might be a browser or Google Font issue, but switching browsers and turning off CSS had no effect. Any thoughts? Thanks!