Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-03 16:13:00

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

seperate tab for each section

Ok I have a client that would prefer to have write tab for each section….so for this case I need two write tabs one would be default to the NEWS section and the other to a SALES section. Is is possible to just clone the write tab and default it to a different section?

Thanks for any direction….

Offline

#2 2008-07-04 04:40:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,257
Website GitHub Mastodon Twitter

Re: seperate tab for each section

I think that this might be easier to do with two installs…


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2008-07-04 04:50:07

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: seperate tab for each section

I think that this might be easier to do with two installs…

I think a little plugin (and couple lines of jQuery powered JS) is much more easier than two seperate installs. Installing two TXPs for one same site, just sounds cheap :P

Offline

#4 2008-07-04 13:29:20

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: seperate tab for each section

i am using a combination of asy_dashboard

http://forum.textpattern.com/viewtopic.php?pid=84885#p84885

and this new top level tab code:

http://gerhardlazu.com/blog/49/addremove-admin-tabs-without-hacking-txplibheadphp

to create a dashboard with a tab so you can always get to it….then there are links to the specific actions that are desired….now I have gone and hacked the txp_article.php file to grab a variable from the url and default to that section….specifically the getDefaultSection() function, took one line of code.

However this would be much better if it was all in a plugin but how do I get the proper section selected when I go to the write tab using jquery? I am a jquery rookie/nob…..

thanks guys

Last edited by cuda (2008-07-04 13:30:40)

Offline

#5 2008-07-04 14:28:44

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: seperate tab for each section

$("#section option[value=MySectionFromURL]").attr("selected","selected");

For getting the GET variable from URL, you could use something like this

Offline

#6 2008-07-04 16:56:51

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: seperate tab for each section

I’m a bit late, and it seems like a lot work is already done, but wouldn’t it be easier to hack sed_section_fields to react on a user name instead of a user privilege? Plus you can get rid of it by simply switching it off.

Just a thought.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2008-07-04 21:45:59

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: seperate tab for each section

uli wrote:

…react on a user name instead of a user privilege…

Uli, offtopic? This is about seperate tabs for all sections, not about privs or usernames…

Last edited by Gocom (2008-07-04 21:46:18)

Offline

#8 2008-07-05 22:12:52

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: seperate tab for each section

thanks gocom I am getting something up and running now with no core hacks…and learn some jquery on the fly too!!!

Offline

#9 2008-07-06 07:45:51

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: seperate tab for each section

cuda, I’d love to see how this pans out and also how you achieved it. This – along with the ability to to show the article pane with only a subset of articles, e.g. a particular section – is something often desired.


TXP Builders – finely-crafted code, design and txp

Offline

#10 2008-07-06 12:29:04

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: seperate tab for each section

jakob – I am doing exactly what you wanted with the article pane as well using the lam_browse_by plugin and just creating a link on the dash board for the specific search criteria…this could have been achieved with just the basic search function too. But I am kicking around the idea of making this into a plugin….

Here is what I have now:
1. Upon Login you get the dashboard
2. There is a top level “Dash Board” tab
3. You can create links on the dash board page that link to the article pane for a specific section
4. There are links on the dash board that go to the write tab with the desired section all ready picked and if you use sed_section_fields all the proper custom fields will show

This is all very messy and hacked up but if I find time I will try to release it

Offline

#11 2008-07-06 18:05:32

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: seperate tab for each section

Hi cuda,

Can you give examples of your links?

I guess you mean something like /textpattern/index.php?search_method=section&crit=mysection&event=list&step=list&search=Go to obtain a pre-filtered article list. How do you make this appear in its own tab?

I’d be interested to know how you link directly to a write pane with the section pre-set? And again, how this could be made a tab of its own.


TXP Builders – finely-crafted code, design and txp

Offline

#12 2011-06-29 02:50:28

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: seperate tab for each section

Jakob:

Sorry to jump onto an old thread — but I need the exact functionality decsribed in this thread for a project I am working on. I think creating the new tab has become extreemly easy now with the use of Stef’s http://forum.textpattern.com/viewtopic.php?id=35882 But I am curious whether you ever found an answer to your question or got the above up and running in a project for you or a client —

Thanks.

progre55

Offline

Board footer

Powered by FluxBB