Is there the equivalent of the WP plugin Types for Drupal 7? - drupal

So I have a Drupal 7 client who needs to have a dynamic content type...
name, description, 3 images
We will show these "objects" (for lack of a better word) in a filterable grid. Also, the client needs to be able to add, update and delete these on their own.
I have done this sort of thing many times in WordPress with the plugin called "Types" (https://wordpress.org/plugins/types/).
Is there an equivalent plugin for Drupal 7? If not, any thoughts as to how I would go about this?
Thanks,
David

One of the great advantages of using Drupal is that it is a framework for creating custom content types very easily using the administrative interface. See this for further reference and good luck!
http://m.linuxjournal.com/content/creating-and-theming-custom-content-type-drupal-7

Related

Custom code in Wordpress: what are the programming limitations?

I have a website (www.easterisland.travel) that I'm considering converting into a Wordpress site. Why? Basically for the following reasons:
1: To use a CMS, so that I can teach others to further add content to the website without having programming knowledge. I would built the advanced pages myself though, and the pages that others would manage would be simple information pages.
2: Access to all of these great plugins, for example the "similar pages" plugin at the bottom of each page (which I haven't found as a independent solution for raw webpages), which is just fantastic to keep people reading.
At my site I have lots of custom stuff like booking systems that I've created. There's an AngularJS shopping cart (www.easterisland.travel/tours/), instant online booking and payment (using PayPal's Express Checkout) etc. There's a page for cruise ship shore excursions (www.easterisland.travel/cruise-ship/) that's automatically generated from database data, and I've created a system where I can add cruise ships and shore excursions (adding correct itinerary, price, info etc). Passengers can also log in and communicate to other future fellow travelers within the same group, and get organized for meeting up on the tour day. I have many more plans to go as well, for example showing hotel info, displaying TripAdvisor data (using TripAdvisor API) etc.
The million dollar questions are:
1) Can all of this be achieved in a Wordpress site? Can I add all of these systems using this platform? What are the limitations?
2) Would it make sense to change to Wordpress?
3) What implementation should be used? I don't want my code to be removed or altered when Wordpress is automatically updated.
Thank you!
Wordpress doesn't have any limitations, you can extend its default functionality if it can't accomplish what you need with either plugins or custom code. and having a framework is always better than building from scratch in many ways.
HOWEVER, wordpress was originally design as blogging platform, and if you plan on extending its simple functionality you should take some time to understand how it works to properly integrate your custom needs or things could get ugly,
If you know how to interact with the database, you can easily do what you want, there are built-in functions you can use according to your needs for database interactions or just create your own if it doesn't fit well very much.
just a quick overview with wordpress database.
wp_posts - where sites main front-end data are stored, like posts, pages,
wp_postmeta - storage for additional data that are stored on wp_posts
wp_comments - storage for user interaction data for wp_posts like comments, I've also used these before to store user/admin messages.
wp_terms - use for dividing/categorizing wp_posts data, like categories and tags,
wp_options - use for back-end storage data and configuration.
You'd need to check out these functions as you're probably will encounter them in the future
https://codex.wordpress.org/Function_Reference/add_post_meta
https://developer.wordpress.org/reference/functions/get_post_meta/
https://codex.wordpress.org/Function_Reference/update_post_meta
https://codex.wordpress.org/Function_Reference/register_post_type
https://codex.wordpress.org/Function_Reference/register_taxonomy
https://codex.wordpress.org/Class_Reference/WP_Query
If you also need database interaction, check out https://codex.wordpress.org/Class_Reference/wpdb
and for front-end implementation, check this out https://developer.wordpress.org/themes/basics/template-hierarchy/, though I never used any other wordpress theme except Genesis Framework for these past 5 years as I never had to mess too much with HTML codes and almost everything can be customize using actions & filters. I advise you to use Theme Framework (and remember to always use CHILD THEME to be safe from Main Theme upgrade)
You might also want to check -> https://github.com/WebDevStudios/CMB2 (I prefer to use this than Advance Custom Fields plugins.)
Booking system in wordpress is a bit complex, I've successfully use gravity form as booking system with AngularJS + Ajax, but never tried a custom one from scratch and don't have a chance to use booking plugin as never encountered a cleint that wants a simple booking system.
Just to answer your question.
Yes, It can, for comparison, take a look at woocommerce plugin functionality and features, I believe thats more complex than what you need.
It would make sense to convert a site built from scratch to any CMS (wordpress is an option), the CMS is up to you, though its better to use the one that you know more for easier integration and customization.
You can use your child theme "functions.php" for extending your custom functionality, like create a folder in your theme for all your custom code and include/require it on your child theme functions.php or better create your own plugin to properly integrate them, you can divide the functionality in plugins, like plugin for booking system and plugin for payment functionality. check this out https://github.com/hlashbrooke/WordPress-Plugin-Template
I hope this would give you an idea.
Yes you can do all that. You will need someone with knowledge in wordpress themes and plugins but it is possible. The beauty of wordpress is, that you can write "bare" php code, and the small amount of functions to interact with wordpress are well documented.
Wordpress itself, is structured "simple" (compared to fancy tools like magento for example). So all it manages, are posts / pages / ... which, more or less derive from the same database object. You can add functionality to those things (for example, make posts cruise ships and other posts to shore excursions) or you can add your own database structure on top.
The theme system is bare php code, so you dont have to crawl through a thousand lines of xml codes to adjust little things.
Wordpress power derives from its simplicity of the "core wordpress" and the feature volume based on all those plugins. I believe alot of people would say, that you should go for a custom solution (based on symfony for example), or a CMS that already comes with more of your desired functions (like magento which has the checkout / paypal included), but I (as a wordpress fan) would see no problem to take wordpress.
I have never failed to find a plug-in to do what I needed! I manage three WordPress sites - although none of them is commercial. (Yacht Club, Cycling Club and Political Party EDA).
There is a plug in that allows PHP on any WordPress page, but it means that the Editors all have to write using the text (HTML) view rather than Visual tab. I found that useful for some of my pages - and I'm the only "Editor."
There's also a plug-in that allows you to code PHP in Widget. That doesn't have the above disadvantage.

best practice of form page using drupal 7

Im really newbie with drupal 7 and I want to tests things with it:
I want to build a form page that will get information from users.
for example workes that input FIRSTNAME, LASTNAME ID, PHONENUMBER and etc.. after that they will submit and it will enter to the workers db.
as I mention im really newbie with drupal.
so first of all, where do I start? is form api is the best way to do it?
secondly, the system create the workers db or I need to create a new db and table?
Drupal has examples module that has lots of example for developers you can install it and check code how it, i think form_example it suite for you.
Why don't you use the standard Drupal Content Types. You can create a content type named worker and the have your workers add their info as you wanted.
To create your custom content type:
You can create your own custom content types by going to Menu >
Structure > Content types > Add content type
(admin/structure/types/add). You might do this as a way to organize
your content. For instance, you might have "Info" and "News flash" as
two simple content types on your site, rather than just using
"Article" for both.
Another alternative to use webform contributed module. It will give you the ability to create a from with fields of your choice.
Webform also provides few features out of the box you might need to use. Like; Limiting number of submissions and unique fields.
Finally, I'd suggest you can read Drupal concepts.

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

CMS with support of Multilingual and custom url rewriting

I'm searching a CMs that can offer me these features :
Localized fields with a custom number of languages
Each article belong to a category that may have parent categories
language and category could be calculated from url example /en/maincategory/subcategory/my-article-url-rewrite
I was looking in drupal for these features. I haven't yet found something on localization. I have found another solution that could satisfy my need which is Plone but I can't decide which can can give me what I want. Can Drupal do all this ? Plone ? Or there is another solution ?
Plone seems quite a good choice for this project.
Localization can be handled using the excellent product LinguaPlone;
Hierachical categories can be handled using collective.virtualtreecategories, or using hierarchical vocabularies and a custom field with a collective.dynatree widget (I did something similar in a recent project);
Plone does not retrive content using URL dispatch, but path traversal; however, using correct content placement inside folders, you can have a directory structure that complies with your format.
Of course, you will also have access to Plone's powerful User and Group management facilities, ACLs, workflow engine, and many other features.
If you are knowledgable in Python, you might also want to look at Django, which is more like a framework than a CMS, but hey...
Yes, eg. Drupal 6 is able to do that. Just take a closer look at modules:
i18n (shortcut for "internationalization"),
Locale,
Language Icons,
Pathauto,
Transliteration,
etc.
There are a lot of tools for that.
To look for multilanguage-related modules, just follow the link: http://drupal.org/project/modules?filters=tid%3A97%20drupal_core%3A87%20bs_project_sandbox%3A0&solrsort=sis_project_release_usage%20desc
Drupal even provides translation files for its interface and some modules have translation of their interface bundled in the installation files.
If you only need the features you specified, the only thing you need is to install modules you choose, change the default configuration if needed, and you are able to do what you planned :) Drupal has some administration interface that is not friendly to new users, but it is surely able to quickly fulfill your requirements.
If you're using a fixed list of categories and sub-categories then all of your requirements are standard features of the eZ Publish CMS available at http://share.ez.no
If they are not a fixed-list then you may need to create a bit of custom code.
That CMS also uses Zeta Components

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