Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedGet visible tabs for userGet visible tabs for user
Previous
 
Next
New Post
2/26/2011 9:50 AM
 
Can somebody help me to write function to get me visible tabs for user.

=======================
Input:
-int PORTAL
-string USER
-string PASS

===============
Output1:
-Tabs collection


OR

Output2:
-XML visible menu data
 
New Post
2/26/2011 12:46 PM
 
are you inside DNN (writing a module) or outside (writing a separate application)?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
2/27/2011 2:43 PM
 
I using IWeb and want to write web method for get visible tabs for username.

this is my code for showing all tabs:

[WebMethod(Description = "Get tabs"), SoapHeader("IWebCredentials")]
public List<string> GetTabs(int MyPortal)
{
    List<string> tmp = new List<string>();
    TabController controller = new TabController();
    TabCollection tabs = controller.GetTabsByPortal(MyPortal);
    IDictionaryEnumerator hs = tabs.GetEnumerator();
    while (hs.MoveNext())
    {
        TabInfo tab = (TabInfo)hs.Entry.Value;
        tmp.Add(tab.TabName);
    }
    return tmp;
}


Now I wish to extend this code with username an this function:
DotNetNuke.Security.Permissions.TabPermissionController.CanNavigateToPage

but don't know how to pass user to CanNavigateToPage

I already make post on:
http://iweb.codeplex.com/discussions/...

but they tell me that I shuld ask here.
 
New Post
2/28/2011 7:43 AM
 
Now I change my code to this:

[WebMethod(Description = "Get Visible tabs"), SoapHeader("IWebCredentials")]
public List<string> GetVisibleTabs(int MyPortal)
{
    List<string> tmp = new List<string>();
    TabController controller = new TabController();
    TabCollection tabs = controller.GetTabsByPortal(MyPortal);
    IDictionaryEnumerator hs = tabs.GetEnumerator();
    while (hs.MoveNext())
    {
        TabInfo tab = (TabInfo)hs.Entry.Value;
        if (DotNetNuke.Security.Permissions.TabPermissionController.CanViewPage(tab))
        {
            tmp.Add(tab.TabName);
        }
    }
    return tmp;
}

But now I get only visible tabs for all or unregisterd users...

Can somebody help me from where CanViewPage read user,
and how I can upgrade tunction with UserInfo  or UserID parameter.
 
New Post
2/28/2011 7:45 AM
 
I use IWeb modul and want to extend it with new web methods, for showing me all visible tabs of a user.

I acessing methods with My WinForms application.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedGet visible tabs for userGet visible tabs for user


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out