1
hydrO
Showing a block in one of the template files?
  • 2006/9/28 16:42

  • hydrO

  • Not too shy to talk

  • Posts: 105

  • Since: 2004/1/8 8


Hi,

I wonder if it is possible for me to display Xcgal random pictures just below every picture. I dont' want it to appear as a block, as I have too many blocks at the moment and I want to place these random pics only under single pictures.


Pictures are displayed using xcgal_display.html template file, and I want to place the random picture codes in that file so it appears just below the picture.

I could't find the right codes from any of the files in the module.

Does anyone have an idea?
Download Dhivehi mp3s
[size=x-small]http://www.gnatoll.com[/size]

2
hydrO
Re: Showing a block in one of the template files?
  • 2006/9/29 7:09

  • hydrO

  • Not too shy to talk

  • Posts: 105

  • Since: 2004/1/8 8


bump * * *
Download Dhivehi mp3s
[size=x-small]http://www.gnatoll.com[/size]

3
hydrO
Re: Showing a random block in xcgal template files?
  • 2006/10/23 17:37

  • hydrO

  • Not too shy to talk

  • Posts: 105

  • Since: 2004/1/8 8


Just making it a little clear.

There is a feature in xCgal which can be used to show random pics as a block.

I would like to show these random pictures right below each picture.

I know a way to go around by showing the Center blocks below the pictures in the module.

I was wondering if there is an easier way to do this by modifying the codes in xcgal templates file.

Any help would be greatly appreciated.
Download Dhivehi mp3s
[size=x-small]http://www.gnatoll.com[/size]

4
kaotik
Re: Showing a block in one of the template files?
  • 2006/10/23 17:59

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


You can do it relativly easy:
place this inside the template where you want the random image to appear:
<{$random_img_alt}>

Now go into the php file that calls this template file. You are going to create a function inside this file that will have it's result assigned to $random_img using :
$xoopsTpl->assign('random_img',$random_img);
Open the file that controls the random image block (located in folder xCgal/Blocks, Use that code inside your own function. You might have to change the var that gets returned, remeber that you want an image

This is just a general aproach on how to do it. You will now have to dig into the code to figure out precisly how to make it work.

Login

Who's Online

371 user(s) are online (300 user(s) are browsing Support Forums)


Members: 0


Guests: 371


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