• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Jforum display selected categories

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I want to display only selected categories. Actually one at a time depending on querystring sent by user in URL.

For example, if user passes http://localhost:8080/jforum/forums/list.page?firstyear as URL, only firstyear category should be displated.

ok, I could restrict the category listing by hard coding following code in forum_list.html

<#assign year = "firstyear">
<#if (category.name == year)>

How can this be done using querystring? If I add query string to URL, it gives me "The requested resource () is not available." error.

Thanks in advance.
Anshul
[originally posted on jforum.net by anshul]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
currently, if you want to pass additional parameters, you should change the URL form, from "forums/list.page" to a regular querystring. There are two variables you should always send: "module" and "action". In your case, it should be written as

http://localhost:8080/jforum/jforum.page?module=forums&action=list&cat=firstyear

You should proceed this way due some limitations of the URL engine of JForum. We're evaluating a possible fix for this in JForum 2.1.8, but it's not sure yet.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

currently, if you want to pass additional parameters, you should change the URL form, from "forums/list.page" to a regular querystring. There are two variables you should always send: "module" and "action". In your case, it should be written as

http://localhost:8080/jforum/jforum.page?module=forums&action=list&cat=firstyear

You should proceed this way due some limitations of the URL engine of JForum. We're evaluating a possible fix for this in JForum 2.1.8, but it's not sure yet.

Rafael



Rafael ,

I did try this out and this works. However every time the forum link is clicked after such page navigation, the page again navigates to login. It seems to be session issue or the issue of SSO.

Can you please help me on this?

Thanks in Advance,

narahari g
[originally posted on jforum.net by naraharig]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rafael, All

Thanks so much for your response.

http://localhost:8080/jforum/jforum.page?module=forums&action=list&cat=firstyear
is working for me.

Can you please help me out use this in forum_list.html to display selected category.

All my attempts in following code seem to fail from last 3 days.

<!-- START FORUM LISTING -->
<#list allCategories as category>
<#if (category.name == name)>
<tr>
<td class="catleft" ><span class="cattitle">${category.name}</span></td>
<td class="catright" > </td>
</tr>
...
...

Thanks in advance.

Anshul
[originally posted on jforum.net by anshul]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where's name come from? You have to add it to the Freemarker context through the Java code. In this case, the class is ForumAction.java, method list.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Rafael ,

I did try this out and this works. However every time the forum link is clicked after such page navigation, the page again navigates to login. It seems to be session issue or the issue of SSO.

Can you please help me on this?

Thanks in Advance,

narahari g



This looks like an SSO problem to me. Probably the "isValid" method that validates if the user is still authenticated. IT seems to return a "user is invalid" message so that the SSO process is recalled for logging in.
[originally posted on jforum.net by Sid]
 
You can't expect to wield supreme executive power just because
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic