1
Ana_T
Re: Integrating phpAdsNew: passing a variable to a block
  • 2004/8/16 19:28

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


just to keep you informed and to thank everyone for your help: the block I hacked is showing now and the phpAdsNew-integration is working. I still don't know what the problem was with the systems block, somehow it seems to have been generated twice and the second one is working... But to be honest, I didn't try to figure out where the problem was once it was working ... .

Thanks again for your help!!!!

Ana_T



2
Ana_T
Re: IE5: problems with block width and overall distances
  • 2004/8/16 19:24

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


Thanks to everyone for your answers! Strange enough, this is exactly what I tried half an hour ago, before looking up your answers: I removed the margin- and padding-values from just one format (the general table-format) in the theme-css, and suddenly, it's looking fine!!!!

Yes, you're absolutely right, this is not a xoops-problem, but it is a little bit disappointing that the XOOPS default-theme does not support IE 5, as buggy as it might be... Don't get me wrong, I'm really happy with xoops, I'm just a little bit tired of all the code-searching I did the past two days ... )).

Thanks a lot to everyone, this community is just great!!!!

Ana_T



3
Ana_T
IE5: problems with block width and overall distances
  • 2004/8/16 12:15

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


Hi everyone,

I suppose this is not a new subject to the XOOPS-Community, but I just found out XOOPS has got some problems with IE 5.0 and 5.5. As I'm now using 5.5 for testing reasons, I've noticed that some of the problems I found in my site also occur here on xoops.org...
Well, I solved some of the major ones (like contents from one table cell reaching into another) by using fixed widths and that's ok so far.
But there still are some problems I just can't seem to solve:

- all blocks which contain a table (like xoopspoll_block_poll.html) are shown with a wider width than the other blocks and the right border of the table is being cut. I already tried putting the table width to 98% (a solution suggested in the german xoops-forum), but it doesn't change anything).

- The width of the blocks doesn't seem to be right anyway. I set the width to 170px, but all blocks (with the exception of those mentioned above) are smaller. In relation to the total width, the width should be ok (total width 986px, blocks 170px each, content-part 646px). I also tried making the content-part smaller, but this doens't change anything either.

- The problem with the right table border being cut also occurs on some pages of the content-part - everytime I've got (inside the content table) several cells in one table row, each containing another table.

- All in all, the distances (horizontal and vertical) are much wider in IE 5 than in IE 6 or in Netscape. So the page doesn't really look very nice in IE 5... ;-(

This is slowly starting to drive me nuts - I'm already dreaming of table structures and widths in the night because I really tried everything I could think of and it just doesn't change anything.
In IE 6 and in Netscape everything is working just fine... But unfortunately I think many of the potential visitors of our site will still use IE 5, so I really got to get this fixed...

Anybody's got an idea or had the same problem? I really would appreciate any hint....

Thanks a lot for your help!!!

Ana_T



4
Ana_T
Re: Integrating phpAdsNew: passing a variable to a block
  • 2004/8/4 10:07

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


@Dave_L: I want to create my own blocks (left/right) which then except for the title should contain only the ad.

@wtravel: I also checked if it is set as visible. I'll check the php next...

Ana_T



5
Ana_T
Re: Integrating phpAdsNew: passing a variable to a block
  • 2004/8/3 20:20

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


Still searching for a solution... As proposed, now I tried to hack the systems module (in some other thread someone proposed the systems module for this) and add a block as part of the module. Unfortunately I don't have any idea if this could be working, because the block is not shown anywhere. Anybody's got an idea why?

This is what I did:

I added the following in the system xoops_version.php

$modversion['blocks'][13]['file'] = "werbung_button.php";
$modversion['blocks'][13]['name'] = "Werbung";
$modversion['blocks'][13]['description'] = "Button-Werbung aus phpAdsNew";
$modversion['blocks'][13]['show_func'] = "getAds_button";
$modversion['blocks'][13]['template'] = 'system_block_button.html';


Then I created the file werbung_button.php with the following function:

function getAds_button()
{
   if (@include(
getenv('DOCUMENT_ROOT').'/xoops/html/modules/phpAdsNew/phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw3 view_raw ('zone:3'0'_blank''''0'$phpAds_context);
        
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw3['bannerid']);
   }
        
$block = array();
        
$block['ads'] = $phpAds_raw3['html'];
        return 
$block;
}

?>


Finally I created the file system_block_button.html with the following content:

<div style="text-align: center;">
<{
$block}>
</
div>


I uploaded all files, updated the module in the system administration and changed the permissions in the groups section, giving anonymous users group rights for the created block - but still: the block is not shown... Did I forget anything???

Thanks for your help!!!!

Ana_T



6
Ana_T
Integrating phpAdsNew: passing a variable to a block
  • 2004/8/3 14:17

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


Ok, I found out how to pass the variable to theme.html which solves my problem for the header. But I also need to show ads in the blocks, and I cant' find out how to pass a variable to the block. If I do it the same way as for theme.html, assigning it in the header.php like this:

$getAds_button = $phpAds_raw3['html'];
$xoopsTpl->assign('getAds_button', $getAds_button);

and then print <{$getAds_button}> in the block as HTML, it just returns <{$getAds_button}> as text. If I just define

$getAds_button = $phpAds_raw3['html'];

and then print echo $getAds_button in the block as PHP, I only get an empty block...

So the question is: how can I assing the variable $phpAds_raw3['html'] to a specific block?

Any help would be very much appreciated!!!!

Thanks a lot!
Ana_T



7
Ana_T
Re: Problems in integrating phpAdsNew
  • 2004/8/3 12:19

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


I solved it - found the answer in the following thread which deals with passing variables to theme.html:https://xoops.org/modules/newbb/viewtopic.php?topic_id=22912&forum=7



8
Ana_T
Passing variables to a block
  • 2004/8/2 21:22

  • Ana_T

  • Just popping in

  • Posts: 8

  • Since: 2004/7/30


[I changed the subject - was: Problems in integrating phpAdsNew]

Hi everyone,

anybody working with phpAdsNew?
How can I assign the variable "$phpAds_raw['html']" to my XOOPS-environment? I'm trying to integrate phpAdsNew into XOOPS and I just don't know where and how to "assign the variable" as described in the phpAdsNew-manual.

At the moment, the structure is as follows: I'm calling <{$xoops_banner}> in my theme.html which is assigned to the function "get_ads()" in the header.php, and the function "get_ads()" contains the code generated by phpAdsNew.
But it seems like I've got to use a variable because if I don't, the banner is printed as the first thing on the page...

I would be really grateful if anybody could help me out with this one...

Thanks for your help!

Ana_T




TopTop



Login

Who's Online

160 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 160


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