Jump to content

YYHMedia

Members
  • Posts

    12
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://yyhmsg.net/

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,577 profile views

YYHMedia's Achievements

Jr. Member

Jr. Member (3/6)

2

Reputation

  1. Thanks for the response and, yes, that would work if it wasn't a multi site setup, but in this case they objects wouldn't match.
  2. $query = strtr($crc->title, array('(' => '', ')' => '')); Changing the query line in my first post and "self sanitizing" with the command above works - but I'd still like to get an answer as I feel like this should be happening behind the scenes and there must be something I'm doing wrong within processwire to run into this....
  3. I have a few multi-site instances that are talking to each other through a list of conditions primarily. A few of these conditions (full list here) have parentheses in them such as "Rheumatoid Arthritis (RA)". The code below should be pulling in the article that is found on the corresponding page on my blog - https://blog.yinyanghouse.com/relationships/conditions/rheumatoid-arthritis-ra When I try to match these between the sites in a selector I get nothing back. I've tried sanitizing it such as: foreach ($page->category_relationships_conditions as $crc) { $query = $sanitizer->selectorValue($crc->title); $myBlogsStart = $bl->pages->find("template=page-blog, category_relationships_conditions=$query, sort=title"); foreach ($myBlogsStart as $mbs) { if (!in_array($mbs,$myBlogs)) { $myBlogs[] = $mbs;} } } Every other selector except these few works perfectly. How can I get those to match correctly?
  4. I have a dropdown selector for a particular template/page type that allows me to select associated pages - in this case herbal ingredients. So on the page: https://theory.yinyanghouse.com/theory/herbalmedicine/tcm-formulas/shen-bu-xin-wan-calm-shen-and-supplement-heart-pills , for example, at the bottom you see "this formula has 8 ingredients" and then below that it links to all of those pages. This is created by going through the array $relherbs = $page->fherb_ingredients; What I would like is a field than when I edit the page that is dynamically created with some data from that array. Ultimately I would use this to cut and paste into another site for some related links. So a field that takes what I've selected in my dropdown list and does something like: show in field when editing go through the $relherbs array and show: $myherbs .= '<li><a href="' . $relherb->iherb_functional_grouping->url . '">' . $relherb->iherb_functional_grouping->title . '</a></li>'; I don't need or even want this field to be saved into the database, just shown in a field on the edit page. I could technically also do this by having it shown only to admins on the page itself - either way is fine. That seems like it would unnecessarily slow down page loads for no good reason though. This page seems close, but it's not quite what I want, particularly since I don't want it actually saved. Thanks for any help.
  5. Jumplinks wouldn't work because the problem was one level up (i.e. before processwire). For what's it worth I "fixed" this by adding a near duplicate redirect after noticing what appeared after it= - namely the name of the subdirectory was removed so at the top level - yinyanghouse.com RewriteRule ^theory/herbalmedicine/(.*) https://theory.yinyanghouse.com/theory/herbalmedicine/$1 [R=301,L] Was passing https://theory.yinyanghouse.com/theory/herbalmedicine/xxx?it=herbalmedicine/xxx which led to a 404 not found So in the pw .htaccess I added: RewriteRule ^herbalmedicine/(.*) https://theory.yinyanghouse.com/theory/herbalmedicine/$1 [R=301,L] which picks up the part that was being passed "incorrectly" and passes it "correctly". So now https://yinyanghouse.com/theory/herbalmedicine/ai_ye_tcm_herbal_database correctly goes to: https://theory.yinyanghouse.com/theory/herbalmedicine/ai_ye_tcm_herbal_database (the processwire part of my site) Strange but it works....
  6. So I'm just about finished up migrating a large drupal site to processwire. I'm now testing some redirects and ran into an interesting problem that --might-- have something to do with processwires default .htaccess file. So I have a main site example.com And a subdomain products.example.com (apache hosted out of /public_html/products/....) (and a few other subdomains all in wordpress incidentally). I need a redirect like: http://example.com/products/productname.html -> http://products.example.com/productname.html So I tried something like the following at the top level domain .htaccess: #othersub RedirectMatch 301 ^/other/(.*) https://other.example.com/$1 (this works and is a WP site) # Complicated Subdomain Redirects RedirectMatch 301 ^/products/(.*) http://products.example.com/$1 (this is the PW site and it instead gives me http://products.example.com/productname.html?it=products/productname.html) - which is incorrect. This is either an easy processwire issue for someone who knows the .htaccess file well - or it's a server configuration thing from the subdomain and the url "folder" having the same name. But I've tried just about every possible variation I can think of and cannot get this to work. Any guidance would be appreciated. Thanks!
  7. I'm currently building one site in processwire and greatly enjoying it. Another site I have plans for is a social networking/forum site. PW is currently a little weak in that area with regards to prebuilt modules for social login, open graph posting, following, etc. - although it's all possible certainly. I came across hull.io which is a french startup that provides social logins, mentions, follows, commenting, etc. more or less out of the box as a service. I'm curious about a couple things... 1) Does any one have any experience with this and/or any production sites using it? 2) How would one go about integrating hull.io with PW users - i.e. socially login via hull.io and then get a pw user made automatically? There is a wordpress module that I've looked through to see how they did the integration and I think between looking that over, the hull docs and perhaps the pw facebook login module I could get close. Could use some pointers, or ideally some info from someone who has used the service. Their docs have some notes for external integrations - http://www.hull.io/docs/users/byou This might be a quick way to add social services to a pw site without a ton of custom coding. (oh and I don't work for them certainly.... just curious about how to go about this type of integration and if anyone has done it)....
  8. Thanks for the input Joss! I've looked at liferay previously and while at first it seemed like it would meet many of my needs it eventually seemed far too cumbersome to make unique to our site. I was also worried about not being able to keep it upgraded the more your customized it - which is where I ended up with drupal and what I would love to avoid in as much as possible. And then, discussions like the one that follow this article - http://liferaycms.wordpress.com/2011/03/09/liferay-hate-love-learn/ - further confirm my hunches towards complexity and maintainability. I agree with you that it would be some work to get pw to meet our needs, but less I imagine compared to starting from scratch. I do wish the multi site features were already in there as that would meet my needs very well, but the services module should be close if I can understand the best way to integrate the sites - like evening cron jobs that would create data links or doing it at submission, etc. I'll have some more time this weekend to explore it further and try to integrate some user features that I didn't have time to mess with last weekend and then I should be able to decide whether or not to move forward. I hope that some of the functions that I'll need, recurring billing, etc. I could write in a way to give back to the community - but I have some learning to do to make that happen. Thanks again for the suggestions.
  9. Thanks for the feedback diogo, I'm continuing to explore pw. I'd personally love to use as many out of the box solutions as I can, but there aren't too many that are a good fit due to the nature of the site. I was reading last night that pw3 has some more finite plans to include multi-site features with a multi-site api - which would completely meet our needs. For now, I'll have to continue exploring the services module to see if splitting the site is worth the hassle.
  10. I know this has been asked a bunch of times in the forums and I've read many of the responses, but I'm asking again due to the complexity of my proposed project (and my own level of competence and general confusion!). I'd like to take this opportunity to explain a bit about what I'm trying to accomplish and see if you'd recommend processwire, a framework like django/laravel/yii2, or even a combination of both? I just spent the weekend exploring processwire after having put it off as a contender for my project probably a year ago. I was very impressed with what I was able to do this weekend. Long story short on the content/data relations part of my project I did more in a few hours from knowing nothing about pw than I was able to do in weeks of django (which is what I had planned to use initially). So, I have a somewhat complicated site that doesn't fit well into a particularly category (really it's 3 inter-related sites in one). Long story short, the site is yinyanghouse.com and it's a large Chinese Medicine community site with a store, some complicated data relationships and then community functions (forum, customized user roles/point system, etc.). The data has multiple m2m relationships and is somewhat complex. With a framework approach I would have to spend more time building join tables, etc. but might end up with better performance. So far it seems processwire will be great for this. I was a little concerned with scaling as the # of joins seems like it would be high with the table per field setup, but I've read the forum posts on that and feel good about it overall. The data section is probably ~800 pages or so highly intertwined pages and then some articles and other posts using some of the main categories that would be in the ~4000 page range and growing. The ecommerce part, I considered using foxycart and have that setup in my current demo. I'm ok with that, although I've also thought about pushing that off to a 3rd party. The problem is how related the content part of the site is with some aspects of the store. So it'd have to be a ecommerce app with an API if we go offsite. But for our purposes foxycart will probably be fine and that keeps the store product data integrated into the site as a whole. -- The one question/issue I have is that I'd really like to split the store off into a subdomain - store and from what I've read into multisites - there isn't a great option besides the services framework that exposes the site API to an "external" site. Many of my site connections could be written into the database (i.e. at save take the page connections referenced and write them as html into this field) - in other words they are not changed extremely often once setup. So using the external api approach to communicate between the two would be fine. Would this work for live relationships so to speak - in other words, in the template say show me site1->page->title where that page = this pages category - or would that be too slow or too cumbersome trying to hit multiple databases? Does that make sense? The biggest concern I have is for the community part. And my concern is the level of custom coding that this part would require and if this is better served by laravel or something along those lines instead of digging deeper into processwire. On my current site I've built many of these features inside of drupal which became hard to manage and made upgrades of core next to impossible - I'd like to avoid this situation in the future as much as possible. For this we need social logins (which it seems someone is close to doing this with hybridauth), a subscription membership (which we could do some sort of recurly/chargify integration - or straight stripe - but this is done in laravel and would have to built up in pw), we need custom user roles and permissions to submit certain types of products, need certain friend type connections mostly based around where the person trained, etc. Then we need a practitioner directory - google maps, global searching, and a print layout so use of country/state/province/city data. I'd also like to split the community functions off into a subdomain as well - so my question above about sharing data between with an "external" api and how to do that would come into play - also about sessions between the sites and pw sessions data (this is over my head) - basically sharing logins between sites. Long story short, the site will be pretty custom overall and nothing from my point of view is a perfect fit. What I'm concerned with is what I did to drupal - stretch a system beyond what it was intended and have a maintenance nightmare. Processwire is definitely more of a framework than drupal is in some regards, but a framework framework would have no assumptions which has benefits and costs. I don't see many social networking type sites that have been done in pw, nor heavier ecommerce sites, so I'm curious if I should try to go that route and what you think about splitting the site and sharing data with the services framework behind the scenes. Or what you would think about using pw for the content data and trying to build something entirely around it and integrating the user model between pw and what I would build in a framework. Hope this isn't too confusing (I know it is for me)... I've been very impressed reading the forums, so I trust peoples opinions on what might work. I'd appreciate any feedback you can offer about the project and if I go the pw route, I'm sure I'll have more questions. If you need any more details, please do not hesitate to ask. Cheers, -Chad.
×
×
  • Create New...