
pwFoo
Members-
Posts
708 -
Joined
-
Last visited
Everything posted by pwFoo
-
I think a basic forum shouldn't hard to do... but features like topic / post moderation or additional features (likes, mentions, notifications, inline hashtags,...) should be much work to do...
-
Hi Pete, ElkArte is a SMF based fork from smf ex-team members with some improvements. Found a SMF API plugin, but don't know about it. Haven't tested it... login/ register/ logout via ssi should be easy, but admin has to administrate two systems... Mh, a basic integration should be ok... User accounts (login, register, profile sync; permissions/ roles/ groups should also make sense...). At the moment there isn't a PW forum integration available out there NodeBB Source: https://blog.nodebb.org/the-road-to-v0-5-0-and-beyond/
-
Hi, found NodeBB forum during searching web. After take a look... it's interesting. Anybody know or maybe use it? At the moment I use SMF, but thinking about port/ upgrade it to ElkArte... Both could be work with Processwire via api / ssi functions. But now also NodeBB could be a candidate to use for my (really small) private group forum.
-
So I'll test it soon. Thanks for help Maybe a option for module configuration? Define a global view to be used as main view? Great!
-
Hi wanze, I don't think I'll use the wrong path to the template / chunk, but double check Don't know my planned setup is clear so far... I would NOT output html.php inside basic_page view..., but try to output basic_page view inside html.php view! Won't work, I found your hook into render at source code... html.php <html> <head> [...] </head> <body> <p><?php echo $basic_page; ?></p> </body> </html> Hope the simplified example should show what I need $basic_page is the part of current page done by your module. Maybe I could cutting my html.php to something like html_start.php and html_end.php to get it around basic_page... Maybe views should be not .php because it's confusing to have TWO identical files open at editor / IDE. I'll like to use .tpl or .tpl.php to differ controller and view / template.
-
Hi Wanze, after a short test... 1) My setup seems not supported // init html basic template / layout $tpl = new TemplateFile(); $tpl->filename = $config->paths->templates.'views/html.tpl.php'; // here handle page controller / view stuff [...] $pagePart = $pageTpl->render(); $tpl->set('subtpl', $pagePart); echo $tpl->render(); Because you render and output $pagePart module controlled/ inside I can't use it as sub template Could you make this use possible with TemplateEngineFactory module? 2) Get a 500 error if use chunks / sub templates (for example my html layout view...) $factory = $modules->get('TemplateEngineFactory'); $chunk = $factory->load('views/html.php'); $chunk->set('test', 'TEST'); echo $chunk->render(); At the moment html.php is simple: <h1><?php echo $page->title; ?></h1> <p><?php echo $test; ?></p> Any idea? Maybe you can make my setup working with your module?
-
How could a handle media / ie conditional without hardcode it?
pwFoo replied to pwFoo's topic in Getting Started
multi-value fields -> implode / explode comma separated values... Should be an easy way to do it- 1 reply
-
- 1
-
-
- responsive
- layout
-
(and 4 more)
Tagged with:
-
Hi I try to build a simple basic responsive layout / profile with pocket grid... So it would be great to set additional values as variables. IE conditional comments could be build by a module to generate the needed code. I would use $config->styles and $config->scripts to build a filenameArray with needed css and js files. But how could a add additional values like media attribute or IE condition? Any idea to keep it simple? Last site media query styles were hard coded at page template file (a templateFile template ) before output $config->styles ... Maybe the media queries stylesheets with additional media information could be saved in a (config) page, but need a field with two textfields (filename, media information). Which fieldtype should be used in such a case? repeater, ProField table, ...?
- 1 reply
-
- responsive
- layout
-
(and 4 more)
Tagged with:
-
Used templateFile class before to build a site. You module should make it even easier... Is it planned to add a template cache (to cache the "views") in the future? Don't know how much time caching would be save at a small / medium site... I'll try your module soon to build a pocketGrid base layout also with sub templates
-
Ok, I habe to decide which way I'll do it. Try to build a frontend content management. Maybe full integrated (without modal, not admin ui) could be the best way, but than I have to build the inputfield ui (tinymce, page autocomplete, ...) for it. Fredi or a simple link to backend edit / add form isn't that nice, but should work as expected...
-
I'm also interested in Fredi to edit and add New pages. Any update / release with add page feature?
-
I'm searching for different solutions. SimpleCartJS (not secure because client side shopping cart without server side verification), Snipcart service (secured with product verification via url during checkout) or jQuery plugin smartcart... Snipcart looks good. Simple to integrate into a website. But missing simple (pdf, email) invoice... A nice solution could be a javascript framework like SimpleCartJS (add / remove item, show shopping cart and modify quantity of items) with (only) sendform checkout (send to PW backend to verify values and use defined checkout gateways).
-
I've take a look at simpleCart(js). Nice and simple. Maybe a simple way to get it done, but without server side verification and checkout it's insecure (especially for digital products)... Could it be secured with only "SendForm" Checkout? To verify it at the server? But I think it needs a different/ own checkout gateway...? *update* Thinking about Snipcart integration/ shop...
-
Yes, I'll build a simple pdf template which works fine so long linked and used at current page. But don't get it work as a download link from another page. But for now your way would be fine to get it work. After the module update maybe it's easier to do
-
Thanks Can, I'll try it again that way. Maybe it would work the second time. First time it loads the page instead to generate and download a pdf. Would be great to set a page/ id and get a pdf download link without load the page itself.
-
Would be great to have the option to specify a page. So generate the pdf link for given page instead of the current page? So it gets more flexible
-
Nice! I like it @apeisa: Why the paypal payment module isn't included to your shop module? Is it stable?
-
Any videos to see the shop backend or payment options? I think I have to install me a testing instance to see how it works... Maybe I build a little shop with paypal and invoice payment options. Looked at some shops build with that module before, but wouldn't order any products to see it work *g*
-
@owzim Thanks for explaination.
-
Or simple the same page as called to load the initial page? <?php if($config->ajax) { // page was requested from ajax } The initial (not ajax page load) should be the "else" to that if... Or I missing something?
-
Yeah, I like PW api and module / hook concept Learned a lot! rebuild my (dev) module with key features: register login, logout used hooks to create a profile page after register and send a activation email profiles handled by pages (simple pages with different template) use form api and csrf token to generate form fields, but forms rendered with template files (templateFile class) Code examples to build the module found here at various forum topics. Register, login, logout and profiles working, but its not useable as is at the moment
-
@adrian My bad... code missed at first post because I modified it. Found the solution after write the post and modified it (removed to much code examples *g*) Here is my getTpl() function. protected function getTpl($tpl) { $defTpl = $this->config->paths->FrontendUsers . "/views/{$tpl}.tpl.php"; $custTpl = $this->config->paths->templates . "FrontendUsers/{$tpl}.tpl.php"; if (file_exists($custTpl)) { return $custTpl; } return $defTpl; } Thank You to help me to clearify this question, adrian and WillyC As I posted I use setFilename() to go around the problem with ->filename =. I wondered because much examples use ->filename = xyz to set template file instead of the setFilename() function, but setFilename() seems to be more "secure" to use (and get the expected result?
-
Hello adrian, You won't found my custom module function at github It returns the template file with full(!) path and extension. If exists from the template subdir <module> as user custom template. Else from site module directory -> subdir "views" as module default template. Path and file returned by getTpl() is double checked and works fine. If I set the template with filename within a template file it works fine. Done inside my module it doesn't set the protected class var filename. With setFilename() the class var set correct and it works. I verified it with var_dump. So I'll use setFilename() in the future Send from my mobile
-
getTpl() is a method which returns the template with full path Works with setFilename() but not with filename =. So I'll use setFilename() in the future
-
Optimized code to check reference chain $a = $pages->find("id={$page->GroupRef}, template=Group, created_users_id={$page->created_users_id}")->find("UserRef={$user->id}")->count(); With words... 1) Find all groups created by the current page creator and referenced to the current page 2) where the current logged in user is referenced 3) if count > 0 the current user is referenced via group to the content (and should be allowed to view it) Could be used in the backend (pages and groups created by admin) or also as frontend / user access controll (groups created by frontend users like G+ circles). I try to build a refAccess module around that check in the future. Update First commit, dev, not ready to use! https://bitbucket.org/pwFoo/refaccess