1
WebAgil
How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/6/27 7:50

  • WebAgil

  • Just popping in

  • Posts: 2

  • Since: 2006/6/27


I want to use a TextLinksAds from (http://www.text-link-ads.com/) but I don't know how.

Can you help me?



[size=xx-small][Edit by Bender]: At first glance of the subject list i suspected someone spamming around seeing only the url So i took the liberty to modify your subject a little.[/size]

2
WebAgil
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/6/27 8:11

  • WebAgil

  • Just popping in

  • Posts: 2

  • Since: 2006/6/27


Sorry for the title...

I need to create a custom block with a PHP script but dont work...

Can you help me?

3
birdseed
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/6/27 8:26

  • birdseed

  • Just popping in

  • Posts: 59

  • Since: 2005/2/26


Hi
This is how to add a custom block

Let's say that XXX is the module you want to add a block to.

1. Go to modules/XXX/templates/blocks and create a myblock.html with the following content:

<{$block.mycontent}>

go to modules/XXX/blocks and add a myblock.php with the following content:

function myblock_show($options)
{
$block = array();
$block['mycontent'] = 'This is my content';
return $block;
}

function myblock_edit($options)
{
return "Here I could write my own block editor";
}
?>

3. Add the following entry to modules/XXX/xoops_version.php

$modversion['blocks'][] = array(
'file' => "myblock.php",
'show_func' => "myblock_show",
'edit_func' =>"myblock_edit",
'options' => '',
'name' => 'Hello Block!',
'description' => 'This jenny from the block',
'template' => 'myblock.html');

Have fun!

greetings
birdseedmusic

4
libervis
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/7/14 13:42

  • libervis

  • Not too shy to talk

  • Posts: 183

  • Since: 2004/7/4 1


Wait a sec there.. For what version do the above instructions apply?

As far as I know you can create a custom block from XOOPS block admin interface and select "PHP Script" as content type. That's what I did, but it doesn't work so far. It shows nothing.

I am using XOOPS 2.2.4 and I need to implement text-link-ads ASAP.

Thanks
XOOPS Site: Libervis.com :: For a Free World

-- Libervis Network --

5
libervis
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/7/16 13:42

  • libervis

  • Not too shy to talk

  • Posts: 183

  • Since: 2004/7/4 1


OK, I'm trying with the custom block as said by birdseed.

The problem is that it's not just some text or html that I need to insert here. It's the whole text-link-ads code which I've put in a separate file textlinkads.php.

Now I just want to have the result of execution of that file be displayed as the content of this block.

$block['mycontent'] = 'I need the result of textlinkads.php here!';

I've tried this:

$block['mycontent'] = include('textlinkads.php');

but that's apparently incorrect and I'm no php guru. At least it should give you an idea of what I'd like to achieve. I know there's a way and some of you know it.

Thanks
XOOPS Site: Libervis.com :: For a Free World

-- Libervis Network --

6
libervis
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/7/16 13:45

  • libervis

  • Not too shy to talk

  • Posts: 183

  • Since: 2004/7/4 1


double post deleted
XOOPS Site: Libervis.com :: For a Free World

-- Libervis Network --

7
libervis
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/7/16 13:46

  • libervis

  • Not too shy to talk

  • Posts: 183

  • Since: 2004/7/4 1


triplle post edited by mod...something weired going on!
XOOPS Site: Libervis.com :: For a Free World

-- Libervis Network --

8
libervis
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/7/16 15:57

  • libervis

  • Not too shy to talk

  • Posts: 183

  • Since: 2004/7/4 1


Alright people, I've solved this, in great part thanks to birdseeds instructions above, but with little modifications that suit this specific case (text-link-ads block).

I replaced "mycontent" and "myblock" occurences above with "textlinkads" and instead of this:

$block['mycontent'] = 'I need the result of textlinkads.php here!';


we naturally have this:

$block['textlinkads'] = file_get_contents(XOOPS_URL '/textlinkads.php');


To hopefully make things easier for others who want to implement text-link-ads.com code in their XOOPS site, I've created a package which includes all files already created/modified except textlinkads.php which you'll have to create with the code you got from text-link-ads.com. Read the "README" file for steps to install.

Here is it: http://www.libervis.com/docs/textlinkads_xoops_block.tar.gz

Cheers
XOOPS Site: Libervis.com :: For a Free World

-- Libervis Network --

9
msdana
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?
  • 2006/7/16 21:02

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


Thanks for the instructions!
[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

10
reganjcunlif
Re: How to use text adds from http://www.text-link-ads.com/ with Xoops?

Where did you put the local_XXXXX.xml file? I have everything working now except it can't find the XML file

Login

Who's Online

367 user(s) are online (303 user(s) are browsing Support Forums)


Members: 0


Guests: 367


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