1
noo-b
include directory in page ?
  • 2010/5/12 13:53

  • noo-b

  • Just can't stay away

  • Posts: 456

  • Since: 2007/10/23


ok this is my situation

im helping a friend to create a website for a big company with big staff

i have create a simple staff directory module ..just to display name position department email
and contact number of staff

i also use publisher module by trabis to display information about each of the department
in the company like finances, ict etc

what i would like to do is to include my directory in the publisher page

what i did was to create a php query page

like

Quote:

if ($filename=='xxx333.com/publisher.item.4/finances.html')
{
global $xoopsDB;
$result = mysql_query("SELECT * FROM ".$xoopsDB->prefix("staf_directory")." WHERE department='Finances' ORDER BY seniority");
---

----

}



and put it in a php custom block

include statement

and use the defacer method...
https://xoops.org/modules/newbb/viewtopic.php?post_id=327670#forumpost327670

i put this in publisher

<{$xoops_block_11.content}>

but it is not working...i see the smart variable and not the block content

am i doing this wrong...is there any easy way to do this ? please advise

i am a noob
I Love Xoops

2
ghia
Re: include directory in page ?
  • 2010/5/12 18:36

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Did the block have a proper name (see description)?

3
noo-b
Re: include directory in page ?
  • 2010/5/12 23:18

  • noo-b

  • Just can't stay away

  • Posts: 456

  • Since: 2007/10/23


the name of block is

_department
set it to visible in publisher

i made some test by putting the smarty code in publisher template publisher_item.html... it is working the directory block is displayed in my article..

but why it is not working if i paste the smarty directly in publisher editor ?

i see the variable ...not the block

im using 2.4.4
I Love Xoops

4
noo-b
Re: include directory in page ?
  • 2010/5/13 1:30

  • noo-b

  • Just can't stay away

  • Posts: 456

  • Since: 2007/10/23


edit-

help
I Love Xoops

5
noo-b
Re: include directory in page ?
  • 2010/5/17 11:26

  • noo-b

  • Just can't stay away

  • Posts: 456

  • Since: 2007/10/23


if i read back the info about block anywhee...it is actually only working in template & theme

so maybe thats why posting it together with content is not working


Ok ignore the first post...$filename variable is actually from a past project

actually i did it like this in publisher_item.html template
<{if $item.title=='Finance Department'}>
<{
$xoops_block_524.content}>

<{/if}>



where the 524 block is query to display directory of the finance department

so each department i made 1 block
...Thanks looking good ....
I Love Xoops

Login

Who's Online

156 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 156


more...

Donat-O-Meter

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

Latest GitHub Commits