Drupal: can its functions be customized? - drupal

I've tried searching the Internet for this but I have not found an exact answer. I've seen that Drupal can use modules and its admin page can be customized, but does its functions can be customized as well?
This is what I want to happen:
after writing an article/content, it would be saved first as a draft and be sent to certain people for deliberation. The people would then have to vote if it is okay. If the article/content gets 70% or more approval, it would be posted immediately to the website.
Can I do this with Drupal? If not, do you have any suggestions on other CMS's where I can do this?
Thank you!

While you probably don't need a custom module to achieve the desired result, you certainly could write your own custom module if you wished to.
This documentation should get you started: http://drupal.org/developing/modules
And this is a great set of examples that provide a starting off point for custom module creation: http://drupal.org/project/examples
Like I said though, you're likely better off using contributed modules that have been vetted by the community. See if the workflow module does what you want - search "drupal workflow." You may also need the fivestar module to provide a thumbs up for approval - search "drupal rating."

Related

How to track "popularity" of a WordPress post (views, shares) to present the "hottest" posts in category?

I can code, but don't know much about WordPress internals, so would appreciate any advice or instructions. I am looking for a solution to present the posts on my site in the order of popularity. I am thinking of the following signals:
- number of views
- number of times a download link inside the post was clicked
- number of likes on FB (currently using Monarch plugin)
Please help me to figure out how to get those inputs recorded with WP. When available a no-code solution like plugin will be more preferred unless it has some considerable issues. Examples or tutorials would also be great.
Thank you
You've got a couple of options, first you could use a plugin which would be the easiest way to solve your issue:
https://wordpress.org/plugins/wordpress-popular-posts/
Or you can take a no-plugin approach and do something similar to this:
http://www.wpbeginner.com/wp-tutorials/how-to-track-popular-posts-by-views-in-wordpress-without-a-plugin/
I'm not sure how you'll go finding a solution that will integrate page views with social sharing, that would require popularity being abstracted from page views themselves and another counter being created and incremented via a callback from your social API's.

Advanced Custom Fields in wordpress

I am making my first steps learning to code. I made some courses on Internet and now I am building a Wordpress theme to continue learning from the experience.
The thing is that I am learning how to install a jquery slider plugin and I see that it's necessary to install advanced custom fields plugin and the repeater plugin that is only available in his pro version ($25) and that's not cool...
Now I would like to know if there is some free good plugin with the same functions of advanced custom fields?
I am just starting my experiments with wordpress to learn everything that I need to start building sites, so I don't have the enough experience to know if it worth to pay the $25 for the advanced custom fields plugin or not.
Do you have some suggestion? It will be something useful in the future? Are there other plugins that you recommends to download even if I have to pay for them?
There's so little context around what you're using the slider for and how much the site admins would need to update slides, etc., but I have two comments:
Do you need to use that specific slider? You could rig something up with custom post types, hide the editor and metaboxes, leave only a field for an image upload and whatever meta you like, and have the admin user just add a new post for each slide. Generate those posts in the PHP and have the jQuery slider take it from there. If you're just learning code, that might be more of a challenge, though. I just tend to resist paying for things when there are reasonable alternatives out there.
ACF is a worthwhile plugin. If the general context-free question is "Is ACF worth the $25?", the answer is 100% 'yes.' I use it virtually every day and often wonder how I'd make use without it. In your case, if you have other potential use for the project you're on, then yes, I'd say it's worth it. But still, in the simple context of a jQuery slider, I'm hesitant to purchase it just for that.

Starting out with Wordpress - Creating a text book application

I am basically a Java/Oracle guy. I was told that it is possible to build any simple Web app with Wordpress.
I successfully installed Wordpress on my machine and am trying to create a text book app. For this purpose, it is an employee database, with fields Name, Address, Department, Designation. I need to have the usual create/edit/search/delete functionality.
The problem with Wordpress is, I really don't know where to start, or how to customize pages.
Am I barking up the wrong tree? Is Wordpress more for blogging/news style websites than for traditional database applications? If not, how do I customize Wordpress to create the application described above?
Thanking you in advance.
Viability
Wordpress is a great system for many different applications, not just blogging/news style websites.
There are many articles out there that go in to great depth on this, but here is a good one right of: http://torquemag.io/app-dev/
Getting Started
As with any project, there clearly is more than one way to skin this cat, but right off, here are some basics I'd recommend you check out about customizing your Wordpress install:
How to create a child theme: http://codex.wordpress.org/Child_Themes
How to create a page template: http://codex.wordpress.org/Page_Templates
How to develop a plugin: http://codex.wordpress.org/Writing_a_Plugin
Plugins
In addition to this, i'd highly recommend a few plugins, which will help make things easy for you:
Advanced Custom Fields
•Makes it really easy to add Custom Fields, to allow you to store custom information, associated with a post, page, taxonomy, user etc. really easy to use, has great documentation and support, as well as a really nice UI. I'd also recommend paying the 25 bucks for the repeater field, which is really useful.
Custom Post Type UI
•Easy way to add custom post types to your wordpress instal, the default post types are: posts, links, pages. With this plugin you can add custom post types for things like say, employees.
Conclusion
In conclusion, I don't think you're barking up the wrong tree, I think that wordpress can be a simple elegant solution for a web application, and can easily be molded into almost anything you can come up with.
For developed such kinds of application you need to develop a wordpress plugins. You can handle any kinds of database operation there. You can add create/edit/search/delete functionality

Daily question in my drupal website

I am new to drupal so may be my question will be very dumb.
I want to show daily questions on my website which is build using drupal. The question is of multiple choice and the options should be displayed by default. The visitor will simply click on the ans and press submit to ans. It seems to be like a poll but i dont want to show the summary on submission instead i want to show the correct ans.
Thanks in advance :)
The Quiz module provides, well, quizzes and supports multi-choice questions. After a quiz has been fully answered, it provides various display option. It may suits your need if you use single-question quizzes.
For the quiz to be daily, you may have to add some code or use additional module to handle automatic creation, publication and de-publication of your daily quizzes.
I don't know of any module that will do this out of the box, but the built-in, core module "poll" will do something terribly close.
To get the exact functionality you desire, you could simply override the template files for poll to make it so that it does not display the results upon submission. Then you could make a comment on the poll that contains the correct answer. (You can do this without allowing others the ability to comment.) This would effectively meet the given requirements.
Anyway I know its not a perfect solution, but it would give you the described requirements without too much work.

Migating from CakePHP to Drupal, functionality question

(I've posted this on the drupal forum too btw)
I'm converting the company websites to use Drupal, or at least trying to check that its going to be the best way forward. I have a background in PHP development, and I'm currently using the CakePHP framwork. I've built this site (not my design) and I can see how to replicate most of the functionality using Drupal, most likely using the CCK module.
http://preview.tinyurl.com/yk6u8mt
As you can see from the homepage:
A user chooses a country.
The country is passed using an ajax call to a script that decides which phone is best based on 'in country' network coverage.
A div is shown recommending the visitor the best phone for that country.
I'm wondering how to go about this in Drupal, I'm definitely not after a step by step guide, I just want to know if this kind of thing is possible with Drupal, and what approach to use.
If someone can help that would be superb. Thanks.
Okay, so you've got a path you're defining in hook_menu, which is where your form is being presented - or else you've got it set up as a webform in a node, that could work too.
Either way, in your form you're going to be using AHAH - check out http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#ahah and http://drupal.org/node/348475 .
Basically, you're going to define another path in hook_menu that's of type MENU_CALLBACK, and which will receive the country as input, and then will return the div that you'll display on the screen.
One core example of AHAH that may be useful to you is where you're entering a password and it lets you know if the password is secure enough - check that out.
Edit: There's also some good examples at http://drupal.org/project/examples.
I would look into using CCK and views. you can set up filters for the views. If filters don't work, you have the ability to include php code. I have also successfully added jquery code in the header of a view through which I was then able to have my view filtered by what is typed in a text box.
Coming from CakePHP using Drupal is a pain in the a** - even more for developers.
It's application structure might be designed to ease extensibility but this only means you have a system to enable your own plugins and themes.
While modules are basically the M+C-part the themes are the V-part of an MVC-application. The problem is that this seperation is not very strict in Drupal - in fact you have to break it sometimes in order to make things work (e.g. you have to include a theme_mymodule_myfunction() into your module as default output which you then can override with your theme using mytheme_mymodule_myfunction() ) And don't even bother looking for classes ( see http://drupal.org/node/547518 ).
Also there is no real link from a module to a theme. On many occations this is a good thing as you can switch modules and themes seperatly without creating a problem. For application builders coming from CakePHP (or any other framework) you often feel a lack of "wholesomeness" - you create parts for a base software and have to live with it's drawbacks.
IMHO I wouldn't recommend this step. Drupal is fine if you have to manage a website and might add a few modules to add neccessary value (image gallery etc.) but I definetly don't recommend it as a base for a customized web-app.

Resources