Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-11-2012, 07:56 AM   PM User | #1
sonic656
New Coder

 
Join Date: Sep 2011
Location: 127.0.0.1
Posts: 62
Thanks: 18
Thanked 0 Times in 0 Posts
sonic656 is an unknown quantity at this point
Question own WordPress plugin

Hi. I need to make my own plugin for WordPress. This plugin will work like this:

U made post in Admin panel of WordPress. And u need to tell users that this is an important post. So u just select "important" option in post editor and a small ribbon with some text ill appear on the top of this post. like this:



Is there any existing plugin? If not please help me do this, because I never made any wordpress plugin..... And I need it as soon as I can.

THX very much
__________________
My website is here: http://www.moowdesign.eu/. It is not complete yet, and I want to add language translations for some languages(including english).
sonic656 is offline   Reply With Quote
Old 11-11-2012, 10:54 AM   PM User | #2
Custard7A
Regular Coder

 
Custard7A's Avatar
 
Join Date: Jul 2010
Location: Australia
Posts: 269
Thanks: 32
Thanked 32 Times in 32 Posts
Custard7A is an unknown quantity at this point
You might want to consider a different design to add such a ribbon, it's blocking the "important" text.

The idea shouldn't be hard, in theory. You could add a column in your database table for posts labels "important", or similar. Also, it would be much easier to edit to the existing post-display and admin posting pages, instead of making something independent. More importantly, do you know how to understand and edit PHP, and your database? That would be the real hurdle in this case.
Custard7A is offline   Reply With Quote
Users who have thanked Custard7A for this post:
sonic656 (11-11-2012)
Old 11-11-2012, 12:35 PM   PM User | #3
sonic656
New Coder

 
Join Date: Sep 2011
Location: 127.0.0.1
Posts: 62
Thanks: 18
Thanked 0 Times in 0 Posts
sonic656 is an unknown quantity at this point
I do not know wich table it is in database, but I can search and edit it. I do not know where the PHP for post editor is but I can search for it too So I think I can do it. If nope, I'll tell you . But I don't know one thing. How to use WordPress's functions to get "important" value from database :/

Thx
__________________
My website is here: http://www.moowdesign.eu/. It is not complete yet, and I want to add language translations for some languages(including english).
sonic656 is offline   Reply With Quote
Old 11-11-2012, 01:07 PM   PM User | #4
Custard7A
Regular Coder

 
Custard7A's Avatar
 
Join Date: Jul 2010
Location: Australia
Posts: 269
Thanks: 32
Thanked 32 Times in 32 Posts
Custard7A is an unknown quantity at this point
You should be able to find a part of file that connects to the database to get the posts for display, and at that part you could add to the database query to find which posts are important. Combine with a little HTML and CSS, and you can have ribbon on these posts.

Similarly you would find the connecting to the database in the posts editor, and allow the new "important" value to be updated from this form if it is submitted.

If you get stuck, then post related part of codes so we might spy the parts to change!
Custard7A is offline   Reply With Quote
Users who have thanked Custard7A for this post:
sonic656 (11-11-2012)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:56 AM.


Advertisement
Log in to turn off these ads.