Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
I’d also like to add a class to my article edit link. to avoid extra html in my form. this plugin is great. so simple and essential. thanks!
Offline
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
Is there a way to add a front end edit for comments too?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#33 2007-04-13 08:58:31
- FireFusion
- Member

- Registered: 2005-05-10
- Posts: 698
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
All those wishing to add a class to it, click on the edit option in the plugin tab. Find the bottom three lines that look like this…
return isset($_COOKIE[$rss_ae_cookie]) ? $prefix.'<a href="'.hu.'textpattern/index.php?event=article&step=edit&ID='.$thisarticle['thisid'].'">'.parse($thing).'</a>'.$suffix : "";
}
Replace them with something like this
return isset($_COOKIE[$rss_ae_cookie]) ? $prefix.'<a class="admin_link" href="'.hu.'textpattern/index.php?event=article&step=edit&ID='.$thisarticle['thisid'].'">'.parse($thing).'</a>'.$suffix : "";
}
This is what i added…
id="admin_link" target="_blank"
An ID for styling, target blank so it opens in a new window or tab.
This is my form…
<txp:rss_article_edit>Edit Article: <i><txp:title /></i> : <txp:ob1_modified format="author" starttext="Last modified by " /><txp:ob1_modified format="since" starttext=" - " /></txp:rss_article_edit>
Uses ob1_modified plugin to let me know when it was last edited and by who.
And this is my CSS…
a[id='admin_link'] {opacity: 0.4; position: fixed; width:100%; bottom: 0px; right: 0px; background-color: #fff; text-align: center; border-top: 1px dotted #000;}
#admin_link:hover {opacity: 1;}
This produces a nice transparent, fixed bar it the browsers that support it and a normal link in the ones that don’t
Last edited by FireFusion (2007-04-13 09:02:00)
Offline
#34 2007-05-06 15:32:36
- WebKat
- Member

- Registered: 2007-01-16
- Posts: 301
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
I had this working for a while and then suddenly I noticed that my edit link no longer showed up. The tag is still there in my form, but it just doesn’t show up. I’m logged into Textpattern.
—
WebKat
Offline
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
I’m having the exact same problem as OpalCat ^^
Offline
#36 2007-05-06 16:56:13
- WebKat
- Member

- Registered: 2007-01-16
- Posts: 301
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
I wonder if it’s a conflict with another plugin? Mine are listed here.
—
WebKat
Offline
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
Go to Extensions > Edit Link
Is the cookie set? I recently had to rename mine and reset it to get it to work.
TextPattern user since 04/04/04
Offline
#38 2007-05-06 17:42:56
- WebKat
- Member

- Registered: 2007-01-16
- Posts: 301
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
YES! That worked! Wonder what made it unset itself?
—
WebKat
Offline
#39 2007-05-18 19:25:39
- Prax
- Member

- From: Huntsville, AL
- Registered: 2006-09-27
- Posts: 24
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
Here’s another (simpler, but maybe I’m missing something) way to add a class option to this plug-in.
Dig down to the last few lines of the plug-in.
You’re looking for:
bc. extract(lAtts(array(
Once you find that you’ll see it has two lines of code after that:
bc. ‘prefix’ => ‘’,
‘suffix’ => ‘’
Add a comma to the end of the suffix line:
bc. ‘suffix’ => ‘’,
Add a new line after that one:
bc. ‘class’ => ‘articleedit’
Modify the code that follows in the plug-in to include the new class:
return isset($_COOKIE[$rss_ae_cookie]) ? $prefix.'<a class="'.$class.'" href="'.hu.'textpattern/index.php?event=article&step=edit&ID='.$thisarticle['thisid'].'">'.parse($thing).'</a>'.$suffix : "";
}
That’s it.
As for this Textile mess.. I give up. :(
Offline
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
Is there a way for this plugin to move to the ‘write’ tab?
The reason is that I would like to allow staff writers and copy editors to utilise the ‘edit’ cookie.
The extensions tab contains plugins parsing sensitive information, rss_admin_db_manager, to mention but one which I would not want anyone else to reach.
Forget it… I figured it out:)
Last edited by colak (2007-05-29 08:56:46)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#41 2007-06-06 02:11:19
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
Prax, thanks for the hack! Works well!
If somebody copies and pastes the line frome above that is not marked as code (‘class’ => ‘articleedit’): won’t work as these are curly quotes. Use your keyboard for straight quotes.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
Problem:
Users get confused about how to get back to the page they were on when they clicked the edit link. I know you can press the back button twice, but it’s a pain doing it for every article you edit.
Solution:
I’d like to add the capability to augment the action of the save button to also automatically return the user to the page they were on when they clicked the edit link. I think this could be done by writing and reading a cookie.
Anyone got the skills to code this, I don’t.
Offline
#43 2007-08-10 06:26:29
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
What you intend needs two article editing modes: one for single article editing, when the users are coming in from the rss_edit link, the other one for batch editing articles only on the admin side. If using the “view” link in mode one is too much for them, won’t switching to mode two and back again be even more difficult/theoretical for them?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
why does this plugin work when i set my browser address to mydomain.com but when i go to www.mydomain.com i don’t see it?
Offline
#45 2008-01-30 01:41:24
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: [plugin] [ORPHAN] rss_article_edit - public site edit link
Elliot, I think this has nothing to do with this plugin but with the way browsers administer cookies (or is this an FF only behavior?). Just try logging into TXP’s admin side the way you did with the plugin.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline