Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
srhh
Involved
Involved



Joined: Dec 27, 2005
Posts: 296

PostPosted: Sun Jan 15, 2006 11:28 pm Reply with quote

I'm trying to put in a custom module block and am using the code from the phpnuke how-to manual found here:
http://phpnuke.org/modules.php?name=PHP-Nuke_HOWTO&page=simple-module-block.html

Its works fine, except the module is about twice as wide as the standard one and pushes all my content to to the right. Is there a workaround to get the width adjusted correctly?
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Jan 16, 2006 6:23 am Reply with quote

srhh, that link seems to be having issues at the moment. If the code is short, do you mind posting it here? If it is long, send it to montego __AT__ montegoscripts {{ DOT }} com and I'll take a look at it.

Also, do you, by chance, have an image of the screen that you could post or can we see it on a live site? That will help too.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Jan 16, 2006 9:42 am Reply with quote

Montego, try http://www.ravenphpscripts.com/nukemanual-simple-module-block.html
 
View user's profile Send private message
srhh







PostPosted: Mon Jan 16, 2006 9:53 am Reply with quote

Here is a screenshot of the problem block. You'll see that the 'Who Is' block above it is the normal width.


Last edited by srhh on Mon Jan 16, 2006 11:22 am; edited 1 time in total 
srhh







PostPosted: Mon Jan 16, 2006 11:22 am Reply with quote

Blonde Moment

Opps, the "hidden text" wasn't hiding and that is what was pushing to block to an abormal width.....
 
montego







PostPosted: Mon Jan 16, 2006 8:48 pm Reply with quote

Thank you for letting us know you fixed it.
 
srhh







PostPosted: Wed Jan 18, 2006 2:02 pm Reply with quote

Yes, contrary to poular belief I really do try not cry 'wolf'. Embarassed

But now there i something I really am stuck on.

I got the menu working and started searching for a way to put a background image in the menu block. I found this post here:
http://www.ravenphpscripts.com/posts3769-highlight-block+background.html

I've tried working with the code presented in the post above a few different ways in the menu.php file, but nothing works. I'm new to php and don't really understand how it reads and doesn't read HTML. Where should I put the table tags in the menu.php file?
 
Raven







PostPosted: Wed Jan 18, 2006 2:41 pm Reply with quote

Well, without testing this, I would try wrapping all the $content in a <div> tag. Using that example code as you are, just before the closing ?> tag, try adding this code

Code:
$content = '<div style="background-image:url(\'your_image.gif\')">'.$content.'</div>';


Last edited by Raven on Thu Jan 19, 2006 5:19 pm; edited 1 time in total 
srhh







PostPosted: Wed Jan 18, 2006 3:29 pm Reply with quote

Ok, so I put the tag in, and the block works without errors now, but there still isn't a background image showing. I'm placed the image in various folders, but nothing..

I noticed there is already a $content at the top of the php file, here is a copy:

Global $user, $admin;
$title = "Main Menu";
$content = "
<font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">

Maybe putting the div tags somewhere in the first $content?
 
Raven







PostPosted: Wed Jan 18, 2006 3:42 pm Reply with quote

No. All bolcks have their outpout in $content. So, after the $content is completed, you add the tags before and after. Correct my example to read

$content = '<div style="background-image:url(your_image.gif)">'.$content.'</div>';


Last edited by Raven on Thu Jan 19, 2006 5:19 pm; edited 1 time in total 
srhh







PostPosted: Wed Jan 18, 2006 5:44 pm Reply with quote

Hmm interesting and good to know.
But the adjusted code still isn't picking up my background image. Sad
 
Raven







PostPosted: Wed Jan 18, 2006 9:16 pm Reply with quote

Are you getting an error in your error log? Be sure $display_errors is set to true in config.php
 
srhh







PostPosted: Wed Jan 18, 2006 11:17 pm Reply with quote

Ok, I set it to true, but don't see anything. I'm assuming I'd see an error in my admin panel? Or am I looking in the wronng place?
 
srhh







PostPosted: Thu Jan 19, 2006 12:39 am Reply with quote

I did find the error logs in CPanel. This is the only one that is showing up after I activated the test menu block.
File does not exist: /home/adminob/public_html/akolasia/themes/fiblue3d/forums/images/pixel.gif
 
Raven







PostPosted: Thu Jan 19, 2006 1:39 am Reply with quote

Please zip up your block code, along with a copy of you image, and email it to me. In the email, tell me the path to where you are storing the image.
 
Raven







PostPosted: Thu Jan 19, 2006 5:21 pm Reply with quote

I've sent your code back to you. I still had a syntax error in my code to you Rolling Eyes . Other than that, make sure you are using a fully qualified url() and it works just fine.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©