Custom directories/listings in Joomla - php

I'm trying to create a directory in Joomla, which means, the user will have a form to add an entry (with custom fields) and the entry will show up in a page listing all added entries.
For now, I'm going with SOBI which is a Joomla component handling all this.
Question:
I was wondering if there are any good alternatives, what I'm looking for is :
Multi categories
Custom fields
Easily stylable forms and listings

Well you should try some of the CCK solutions out there. They have all you asked for.
Some of them are:
ZOO
Flexicontent
K2
ZOO is IMHO the best, but has no frontend submission feature. Flexicontent and K2 do have it.

I like Mosets Tree. I've used it on several sites.

Related

basic joomla extension development confusion

I want to develop a joomla 2.5 porfolio extension.
So I need something in the backend to enter a couple of details.
On my frontpage I want to have listed the six latest projects and there will be a page in the frontend where all projects are listed.
I'm new to this whole joomla thing. At the moment I'm reading through the joomla docs and tutorials.
I'm a little bit confused because I'm not really sure which type of extension do I need.
Can all this be done with a single component or a module or do I have to mix both?
Because what I've understood so far a component can just be displayed as a independent page.
And a module has to be included in a page. Like {lastSixProjects}?
Can some please enlighten me a little bit?
If you want to create a page with portofolio only, you may create a component without a module...
If you want to put your portofolio in eg.: articles pages, search page, in a sidebar etc (like a image slideshow plugin) you must create a module (with a component assigned to it)
Please read this: http://docs.joomla.org/Extension_types_%28general_definitions%29 .
I undestrand that you want to put your portofolio in your front page... in this chase you MUST create a module.
Little explanation:
A module is an extension (similary to boxes, or widgets) that are arranged arround a component (in this chase com_content - on your FrontPage). Eg: Ads Module, Search Box Module etc.
A component is a super complex extension (similary to mini applications). It has an administration part and front-end part. All Joomla! pages loads a component. Eg: Content component, Search component etc.
I hope this will help you.
You want a component. Please read this: http://docs.joomla.org/Extension_types_%28general_definitions%29
Agree on 2 previous answers, you need a component with at least one table to store your projects. Then you need to link to a menu a view of the elements on a table. You should be able to make it work in 15 minutes with this component creator for Joomla http://www.component-creator.com/

Defining dynamic pages in wordpress plugin

I am creating my first wordpress plugin. In it, the user will have the option to add new cities and view events on those cities.
My client requirement is that the URL must be like this
SITE_NAME/cities/NY
or
SITE_NAME/cities/Califonia
What is decided is that i will create a folder cities and If user tries to create a new city i will create a file in that folder with that city, Further more I will add the entry into the database as well.I will insert PHP code into the file as well.
Being new to WP plugins. Is my approach right (for creating files)? Is there any other way?
Your approach would work if you WEREN'T using Wordpress, but I would absolutely not advise doing what you're suggesting within the Wordpress Framework.
Rather than trying to reinvent the wheel, just about everything you want can be achieved with existing Plugins. I would absolutely suggest taking this route, especially if you don't have much experience with programming Wordpress Plugins.
Step 1:Install Wordpress
Self-explanatory. Can't do anything without this.
Step 2:Install Types
Installing the Types Plugin will give you a nice interface for registering your own Custom Post Types and many other features for extending Wordpress' core capabilities.
Step 3:Register your Custom Post Type
This is where things start to get complicated. Using Types, Register a Custom Post Type called Event. The reason why you want to have each event as its own Post is because each Event is unique. Cities are meant to encapsulate and define groups of events, which brings us to our next step:
Step 4:Register your Custom Taxonomy
Think of a Taxonomy as a way to classify things. Wordpress comes with two default Taxonomies: Categories (hierarchical) and Tags (non-hierarchical). In your case, you will want to define for your new Event Post Type a non-hierarchical Taxonomy called "Cities".
Step 5:Register your Custom Fields
Custom Fields are the easy part. What defines your event? Maybe some fields that define the start and end times of that particular event? A checkbox denoting free refreshments? The sky's the limit. What defining characteristics would all Events have that makes it an Event? Add those in the form of Custom Fields. These will show up on your Event Editor in the form of Meta Boxes. If you don't see the Meta Boxes on the Edit Page for a particular event, be sure to enable it by clicking Screen Options in the upper-right-hand corner of your screen and ticking the checkbox where your fields would be located.
Step 6:Configure your Permalinks
Much of this can be done either through Types itself (when configuring your Custom Taxonomy), or through .htaccess rewrites, or perhaps even through the Wordpress Permalinks Settings (though, it's fairly limited). My suggestion is to tweak your Custom Taxonomy and Permalink Settings first before messing with .htaccess.
And that's it! Hopefully this should be enough to get you started on everything you need.
maiorano84 wrote a fairly comprehensive guide to setting up the stuff you need, Rather than relying on plugins though, I prefer to show you how to write a plugin to register the custom post type and taxonomy. To that effect, I wrote a little plugin that should do everything you need and it has plenty of comments and links to the docs so that you can understand the Why of things.
Code
https://github.com/fyaconiello/WP_Cities_Events
This plugin does several things
Creates a custom post type Event
Creates a custom taxonomy City
Adds custom metaboxes to Event
Adds City taxonomy to Event
This plugin does not require any additional plugins to be installed, it is dependency free and only uses WP core.
URLS
As far as getting the correct URL Structure, I would suggest you read this thoroughly: http://codex.wordpress.org/Using_Permalinks.
I do not understand the structure you want
CITY is a single term w/i the taxonomy *cities*
EVENT is the post single
SITE_URL/cities/CITY would yield a page of all EVENT posts in that CITY
you need a url like: SITE_URL/cities/CITY/EVENT to read a specific event in a specific city
EDIT on how to urls:
In your Settings -> Permalinks administration panel select: "Post name" and save.
Then, go to your Ce Events -> Cities admin screen.
hover over one of your terms (in my case new york city) and click view.
it should open up that term(city)'s list view and the url structure looks like so: http://wp.local/city/new-york-city/
if you need city to read cities, modify line 102 of the main plugin file i shared with you:
'rewrite' => array('slug' => 'city'),
EDIT 2
Why not create City as a Custom Post Type? You can then define a slug 'cities' and get that result, and also add taxonomies like categories and tags to further aid navigation.
Don't do that. WordPress gives you a goog API for doing what you want to do: managing pretty URLs (slugs), database operations (you don't need to write/read files for that) and the right code workflow for registering and triggering actions.
So, I think you have to start reading the basics about WordPress plugins (its philosophy and API) and then just decide if you want to use its custom post types (ready to use) or if you want to create a specific content type.
yes this is fine approach.One more thing that you can do is that instead of adding the code inside the fie..Pick the code from DB.
Make a table in DB,create a column with varchar as datatype and insert the common code in it .

Using Symfony, sfDoctrineGuardPlugin plugin, How can i customise sf_content? Using partials?

I am using symfony 1.4.8 with sfDoctrineGuardPlugin for my backend.
My question is how can i customise sfDoctrineGuardPlugin's default content? For example, how can i do something on the page between filter and table (on the left hand site)? Or, how can i customize table (http://goo.gl/ZmRey)?
I cannot find any solution for using partials on backend. Is there any way to use partials/components/slots on backend?
I hope you understand my question and tell me a way.
Thanks for your answer(s),
Erman
Partials, components and slots are no different on the back-end to the front-end - your "backend" is just another Symfony application. From the screenshot you gave, it looks like you're looking to customise the admin generator theme.
The quickest way to get started with this is to look in your cache/appname/ folder and see the automatically-generated modules here, with all the template files, partial files and so on. You can then create an empty module in your application, and override select parts of the theme with whatever you want to change. See this part of the Symfony docs for a full list of partials etc, and how to go about overriding them in more detail.
In the specific case of sfDoctrineGuardPlugin-module pages, these can be overrided in the same way as normal modules - simply create eg an sfGuardAuth module and override the selected parts of the module you want to.
If you want to go further and create your own admin generator theme, this is a bit more advanced. Here I will shamelessly promote a blog post I wrote last year ;-) John Cleveley's presentation also provides some great tips.

Beginner question on Drupal

I am new to PHP and am doing some research on Drupal system to set up a website for my church.
Just want to know how to development a module on a page that display a list of articles? eg. display the article by category or tag etc.
Is there any template I can use or I will need to develop the template myself?
Thanks in advance!
Chris
Check out the views module. It lets you define your own rules for viewing articles (or other content types), by tag, category, or any arbitrary conditions you can think of.
in complement to #DanSingerman good answer For category and tags you should have a look at Taxonomy and also SimpleView to get some less advanced user interface when building your views.
If you're only displaying articles, you should go with Wordpress. Most Drupalistas would probably recommend Wordpress over Drupal for this usage.

Dynamic content in Joomla Articles

I have some joomla articles. some values in that article has to be updated by data obtained through a soap call to other site. Is there any plugin available for joomla by which i can embed custom php inside articles?? How can i do this.??
To me, the ideal way is to create a traditional component that gets all the data. This component inserts these values in specified article ids. These articles act as "data containers".
Why create a traditional component? Because you'll be going to use libraries, error corrections and such and a component solution can be more robust. IMHO it's a good idea to avoid php logic in your editor panel.
Then, in the articles that are shown to users in the frontend, using Include Content Item Joomla Plugin, you add {include_content_item 123}, being 123 the id of the article you inserted data you want to show in your component. Doing the {} call outputs the article which id is "123".
Check out the Joomla plugin repository for "custom code in content"
Good luck!
There are a lot of such component, they are more or less the same.
I use Sourcerer, but pay attention as version of php is crucial sometimes.
http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-content/5051
Allows to insert php/js/css code to articles and modules.

Categories