1
trspice
I want to make WFChannel links display outside of the module
  • 2007/5/18 4:04

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


WFChannel is great for making pages and I want to place the page links it creates in the left column of my theme file so that any page I create with the module the link will be generated and displayed.

I located the following in the wfchannel_index.html and placed it my theme but the links won't show.
<{foreach item=chanlink from=$chanlink}>
<
a href="index.php<{$chanlink.id}>"><{$chanlink.pagetitle}>a>
<{/foreach}>

Can some one give me some assistance on this? If I can achieve this it will save me a lot of time in duplicating that simple blank page module ( I don't remember it's name)

Using WFChannel V1.0.7. I know there is a newer version but I prefer the simplicity of the older version.
There's nothing but science....
The Reggae Album

2
nachenko
Re: I want to make WFChannel links display outside of the module
  • 2007/5/18 14:55

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Do you want to put the link in main manu or in another menu?

3
trspice
Re: I want to make WFChannel links display outside of the module
  • 2007/5/18 18:47

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


I would like to place it in the main menu and also below it as a secondary menu list.
There's nothing but science....
The Reggae Album

4
nachenko
Re: I want to make WFChannel links display outside of the module
  • 2007/5/18 19:07

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


To place it in main menu you need to hack the template.

Quote:



This insert the "Programme" link after the first button (first iteration, using smarty vocabulary).

See it in action here:

http://www.sinestesia2007.info

5
trspice
Re: I want to make WFChannel links display outside of the module
  • 2007/5/19 1:57

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Nachenko thanks for the assistance. Your efforts have been quite rewarding.

However, the code positions the link in the main menu but that is not what I want to do. the WFChannel module automatically produces a link to each page it creates and places the link on each page within the module.

I want to display these links outside the module so it shows throughout the site on all pages. The code that the module uses to show the links within its pages is that which I posted first. It is from templates/wfchannel_index.html. On its own outside the module it won't display the links so I know it needs some corresponding command from within the module.

I see the following in the module's index.php
if (is_object($xoopsUser))
            {
                
$chanlink['id'] = "?op=link";
                
$chanlink['pagetitle'] = $myts->displayTarea(trim($titlelink),1);
                
$xoopsTpl->append('chanlink'$chanlink);
            }
            elseif (
$xoopsModuleConfig['anonlink'])
            {
                
$chanlink['id'] = "?op=link";
                
$chanlink['pagetitle'] = $myts->displayTarea(trim($titlelink),1);
                
$xoopsTpl->append('chanlink'$chanlink);
            }
        }


I figure this bit of code (it seems related with $chanlink) must be making it display in the module but I don't know how to configure it to work.

I tried to do this but got errors
<{php}>
if (
is_object($xoopsUser))
{
$chanlink['id'] = "?op=link";
$chanlink['pagetitle'] = $myts->displayTarea(trim($titlelink),1);
$xoopsTpl->append('chanlink'$chanlink);
}
elseif (
$xoopsModuleConfig['anonlink'])
{
$chanlink['id'] = "?op=link";
$chanlink['pagetitle'] = $myts->displayTarea(trim($titlelink),1);
$xoopsTpl->append('chanlink'$chanlink);
}
}
<{/
php}>

<{foreach 
item=chanlink from=$chanlink}>
<
a href="index.php<{$chanlink.id}>"><{$chanlink.pagetitle}>a>
<{/foreach}>


If this is conquered it will be very useful for many users.

Thanks
There's nothing but science....
The Reggae Album

6
trspice
Re: I want to make WFChannel links display outside of the module
  • 2007/5/21 15:52

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Just imageine the great uses this solution will provide.

- Put the call for WFchannel generated page links in the left column with an IF switch and time you create a page with WFchannel you automatically have a link created.

- Unlimited pages can be created
- No more need to manually make the links to pages created by WFchannel
- No more need to have WFchannel create realated pages only

... So any ideas on this??
There's nothing but science....
The Reggae Album

7
trspice
Re: I want to make WFChannel links display outside of the module
  • 2007/5/31 20:16

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


where have all the coders gone?? I figured this hack would be a really simple effort (for programmers) but it seems to pose a major challenge.
There's nothing but science....
The Reggae Album

8
nachenko
Re: I want to make WFChannel links display outside of the module
  • 2007/5/31 21:48

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


I'd create a block.

But is it worth the effort? Making a menu with a custom block and edit it from time to time is not that difficult. If the menu is not going to change in weeks, why bother?

9
trspice
Re: I want to make WFChannel links display outside of the module
  • 2007/6/1 15:05

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


You are misunderstanding what the purpose is.

Have you used WFChannel? If yes then you know that each page you create it has an option to make a link for that page and display that link in the pagemenu on all pages created by WFC, but only within the WFC module.

I want to extract the pagemenu code and place it in the theme file so that when I create a page with WFC it automatically create a link which is visible throughout the site.

I have identified this code (whici is above) but when I paste it in the theme I don't get the links.
There's nothing but science....
The Reggae Album

10
davidl2
Re: I want to make WFChannel links display outside of the module
  • 2007/6/1 15:15

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


May be worth checking this

Login

Who's Online

406 user(s) are online (306 user(s) are browsing Support Forums)


Members: 0


Guests: 406


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits