cornernote / yii-embed-wordpress

Simple integration of Yii directly into your WordPress site
http://cornernote.github.io/yii-embed-wordpress/
Other
8 stars 9 forks source link

nothing happens after installing #2

Closed Bibi40k closed 10 years ago

Bibi40k commented 10 years ago

Hi, i've followed installation tutorial, downloaded yii 1.1.14 and then put foo files into wp-content/plugins/foo/ as you said and nothing happens. what should i do ?

foo plugin is not loaded into wp plugins and i don't know how to access it. example.com/gii also gives me a 404 error.

please help me Bibi

cornernote commented 10 years ago

Hi @Bibi40k,

The module is a bit of a work in progress, but I can try to help.

Have you got search engine friendly URL's enabled in wordpress?

Bibi40k commented 10 years ago

HI, i enabled "Day and name" in Permalink Settings. i also changed "define('WP_DEBUG', true);" into wp-config.php file.

Bibi40k commented 10 years ago

Found the error on foo Plugin. FileZilla linked somehow wp-content/plugins/foo/foo.php and wp-content/plugins/foo/includes/Foo.php and change their content. So now i can enable Foo Plugin but i don't know how to use it. In WP's Foo Menu i cannot see any management (add, edit remove) buttons/links What is the "Dummy Setting" ? What links should i use to access Foo page (table) on the front page ? What code should i use to embed Foo table into a WP's post ?

example.com/gii still gives me a 404 error.

cornernote commented 10 years ago

On my phone at the moment. Will reply with more details tomorrow. Try other seo modes to get gii working.

cornernote commented 10 years ago

In WP's Foo Menu i cannot see any management (add, edit remove) buttons/links

You have to add your own menu links (you can do this in FooAdmin.php), for example:

add_submenu_page('yii_embed_fooBar_admin', '', '', 'administrator', 'yii_embed_foo_create', 'YiiEmbedAdmin::page');

The routing format in the admin is yii_embed_[controller]_[action].

What is the "Dummy Setting" ?

It does nothing, it's just an example of how your module may have settings. These are handled by WP not by Yii. You may also build a settings page completely in a Yii controller, but it's not described in the examples.

What links should i use to access Foo page (table) on the front page ?

Not sure on the answer to this.

What code should i use to embed Foo table into a WP's post ?

You don't need to embed into WP's post, you can access Yii's routes directly.

You have to use the Post Name permalink setting (Admin > Settings > Permalinks).

Once that is done, you can access via example.com/[controller]/[action], eg example.com/site/index.

Bibi40k commented 10 years ago

Thank you Good news: it is working with all types of Permalinks. i was trying to access action admin which wasn't allowed for me because i don't use user admin. i need to find out how to allow access to WP roles. example.com/bar/view/id/1, example.com/bar/index... working

i really need to embed widget('zii.widgets.grid.CGridView') into a WP post.

WP Search doesn't look inside wp_foo_bar table or foobar pages, is there a way to fix this ?

cornernote commented 10 years ago

Hey @Bibi40k,

That's great news that you got it working.

From here you are about as far as the example takes you. You will now need to rely on your PHP/Yii/WP skills to start to use yii-embed-wordpress to its full potential.

i really need to embed widget('zii.widgets.grid.CGridView') into a WP post.

The shortcode tags are the solution to this. You have to create a callback for a shortcode tag (eg [my-gridview-output]) that can be put into a WP post.

As you are one of the first public users it would be awesome if you could share some of your experience, either here in an issue, or on your own website or blog. This will help us better understand the potential usage and therefore expand on yii-embed-wordpress, as well as provide better documentation.

I'll close this issue, if you have any further concerns please feel free to comment here and I'll reopen, or you can create a new issue.