Creating a weekly article of news - drupal-7

I 've got a website based on Drupal that publish every Friday some news about different subjects related to my work (example : http://geotribu.net/GeoRDP/20150220). Right now we already do this but the process is bit painful. So I'm looking for a more straight forward and automatic way to do this.
It's a collaborative work and these news can be created by me or others users of my website. So I can't just create a single page.
I was thinking to create a content type called "news" that contains a single news. Then every Friday all the news created during the week are automatically published and visible on a single page .
Let's take an example and consider the following.
We have two users:
User1 writes news1
User2 writes news2 and news3
On Friday, all the news are merged into a single page :
http://mywebsite/weeklynews/...
news1
news2
news3
Do you have any idea how I could do that ? Or maybe a module exists that could help me ?

Related

WordPress : make categories automatically match according to external API Value

I'm managing a company website, where we have to display our products. We however do not want to handle the admin edit for this CPT, nor offer the ability to access to the form. But we have to read some product data form the admin edit page. All has to be created or updated via our CRM platform automatically.
For this matter, I already setup a CPT (wprc_pr) and registered 6 custom hierarchical terms: 1 generic for the types (wprc_pr_type) and 5 targeting each types available: wprc_pr_rb, wprc_pr_sp, wprc_pr_pe, wprc_pr_ce and wprc_pr_pr. All those taxonomies are required for filtering purposes (was the old way of working, maybe not the best, opened to suggestions here). We happen to come out with archive pages links looking like site.tld/generic/specific-parent/specific-child/ which is what is desired here.
I have a internal tool, nodeJS based, to batch create products from our CRM. The job is simple: get all products not yet pushed to the website, format a new post, push it to the WP REST API, wait for response, updated CRM data in consequence, and proceed to next product. Handle about 1600 products today on trialn each gone fine
The issue for now is that in order for me to put the correct terms to the new post, I have to compute for each product the generic type and specific type children.
I handled that by creating 6 files, one for each taxonomy. Each file is basically a giant JS object with the id from the CRM as a key, and the term id as a value. My script handles the category assertion like that:
wp_taxonomy = [jsTaxonomyMapper[crm_id1][crm_id2]] // or [] if not found
I have to say it is working pretty well, and that I could stop here. But I will have to take that computing to the wp_after_insert_post hook, in order to reaffect the post to the desired category on updated if something changed on the CRM.
Not quite difficult, but if I happen to add category on the CRM, I'll have to manually edit my mappers to add the new terms, and believe me that's a hassle.
Not waiting for a full solution here, but a way to work the thing. Maybe a way to computed those mappers and store their values in the options table maybe, or have a mapper class, I don't know at all.
Additional information:
Data from the CRM comes as integers (ids corresponding to a label) and the mappers today consist of 6 arrays (nested or not), about 600 total entries.
If you have something for me, or even suggestions to simplify the process, I'll go with it.
Thanks.
EDIT :
Went with another approach, see comment below.

Matomo - how to group different URLs in tracking / how to track moodle course activity?

I have the following challenge:
I have a Moodle system and would like to track visitor activity in the courses via Matomo.
The problem is that one course has several activities, but they are found under a different URL structure.
Example: My course has the URL /course/view=1 and also has a few activities that can be found under three completely different URLs (e.g. /mod/forum/view=20, /mod/feedback/view=7 and so on).
Now I would like to have a common tracking for a course room and the activities in it.
Is this possible? Are there any direct solutions for Moodle? Or how could I do this manually in Matomo?
Thanks
It's possible to set a custom URL in Matomo by using the following code in the page:
_paq.push(['setCustomUrl', 'https://yourdomain.com/your-new-page-url']);
You could perhaps do this for all the pages within a "Course" in order to track all of the actions taken in one logical "Page", but this may affect some of the reports for that page (For example page overlay might be broken)
An alternate way of tracking all of the actions would be to set the Page Title that Matomo tracks using:
_paq.push(['setCustomTitle', 'Your Page Title Here'])
This will allow you to group all of the actions under one logical Page Title under the Page Titles report.

Making an Access Filter-Macro Based on Text-Field Input

I've been wracking my brains on this simple macro for days and troweled almost every site and forum for an answer, to no avail. Thus, I come to the gurus of stackOverflow for my salvation:
I'm working in Access 2010 and have a database of events that are coming up. Right now the database opens to a form wherein any user may view the entered events and edit them if there's an error. Likewise, there's a report that pulls it's list from the form that everyone's working on.
What I'd like to do (for ease of use) is have a text field and a button. The field would be for date-input (i.e. 10/20/2015) and when pushed, the button would filter the list of events to show only things on or after the typed date. Likewise, I'm hoping to make another filter for the report that will display items only btw. certain dates (but I'm really just working on the first item).
The concept would look like this:
| [ Text Field | [BUTTON]
Event 1 ...................... Date.........
Event 2 ...................... Date.....
....
..
.
Note: This is a database for people who know NOTHING about Access, so I'm trying to spoon-feed the stuff they need to them.
I really appreciate the help, folks.

Summer camp event registration with Drupal 7

I'm building a site for a summer camp using Drupal 7, and I'd like for it to allow parents to register their kid(s) for week(s) at camp and then pay for it.
Creating an "event" for purchase in Ubercart, and using the pay per node module is the best way i can find to make this happen, a la the great tutorial series done by Pete Yaworski. Unfortunately, this means that parents have to fill out the fields for each week of camp purchased for each kid making this a multi-step process as many parents have 2 or more kids that they register for 2 or more weeks of camp.
I tried thinking about this in in terms of the Organic Groups and Profile 2 modules, where parents can create "kids" as nodes or sub-users, and I also tried the Field Attributes module to incorporate fields as product options, but I failed to come up with any useful implementation.
I think the best option is to allow Parents enter information about their kids (ie. name, age), possibly by entering each kid as a node. Ultimately, I'd like them to be able to purchase individual camp weeks and check a checkbox to indicate which kids are associated with each week, and have it all go into one cart for one purchase.
I'm just brainstorming at this point because I've just hit upon a lot of dead ends. Thanks for your help!
Well, it's been a while and i thought i might share what i've learned. Just to note, i switched to Drupal Commerce, which i think is much better equipped to handle this type of business.
The site is more focused on one user registering multiple people (kids) for multiple events, so having to fill out a registration form for each person specifically for each event that person is being registered for is a bit annoying, and bad UX. Instead, i allow registered users to complete a form (name, address, contact, etc..). Upon completion of the form, they are given a new user role via Rules which allow them to create content of type "kid". This is really sort of an extra step for the specific summer camp site; we expect the kids to have the same address/phone/etc.. as their parents. The parents can create "kid" nodes filling in field like "allergies" "health concerns" "age" and "name". These nodes are passed through a View with a Contextual Filter based on the User viewing the View; the View shows only content created by the User, and only shows field "name". This is then given as an entity reference to a Line Item Type using a checkbox/radio widget. Events can then be created as Products and given that Line Item Type. When a User is viewing the products he/she will see the "Name"s of the "Kids" they have created as choice next to the "add to cart" button. Conveniently, everything in Drupal Commerce from Products to Orders can be interpreted though views, so as long as the "kid" is attached as a line item, it's easy to organize the info about who registered who for what event when, and retrieve further details about all of that.
So, Parents are able to register with the site, fill out basic information, enter in information for each kid they want to register, then select which kid they want to register for which event. More useful, on the backend, the admin can see which kids are registered for which event, as well as who their parents are, how to contact them, and any important info specific to that kid.
Hope this helps anyone doing a similar project. :-)

Move login form from subdomain to homepage and sort comapanies alphabetically

Outsourced a document management system to a CakePHP developer who has now disappeared, without doing the final touches, leaving me high and dry. Project is due Monday the 28th, I'm freaking! I sat for 2 days, but couldn't solve these issues. The main thing is the member login form at dms.domain.com.
It works perfectly and redirects to http://dms.domain.com/dir/dir but members actually need to log in via the login form I created on the homepage www.domain.com
I had a look at the source of the login form on the dms.domain.com which looks really simple, much like standard code, however I tried searching for the form elements in the source code of the entire site, but no luck. This leads me to believe that everything's called from the database, but hopefully not because that's out of my league.
Surely if I can find the form code used on dms.domain.com I can just reuse it on the home page?
The second thing is, once logged in, the list of companies is sorted via date created it seems? but I want it sorted via company, alphabetically. Again I searched the source for code like "asc" but I realized Cake doesn't use standard sql queries. I did however find, 'sortorder' => 'desc', 'sortname' => 'id', and changed 'id' to 'company' but no luck. Below is what I currently see when log in. Thanks
Id Company
1 Fos
21 Mamas
20 Clove
25 Orm
24 Colors
I'm assuming your main site www.domain.com is not written using CakePHP - is that right? If that's the case, you could just copy the generated HTML of the login form on dms.domain.com and paste it into the login form on www.domain.com. Make sure that the action of the form is set to the full path to the login action on dms.domain.com e.g. http://dms.domain.com/dir/dir.

Resources