>>  Site Map >>  Forums >>  General 6x

Forum module - topics in forum:



General 6x - Discussions reagarding any other PHP-Nuke Problems.



Inserting HTML code on main page of site

I am a newbie so please forgive my ignorance.

I would like to write my own html code into a section of my main page but don't know where to start. Do I use a block or a section? The code that I specifically want to insert brings in a list of news from elsewhere. The code was below but I had to delete it because for some reason the forum would not post my message with it there, why?

Anyway, the code is a .cfm script and a few var and html commands. If I could understand why I can't include it in here, I would have included it with my posting.

What I want to add to my phpNuke site is the news window that I created on my other web site at www.tadley-conservatives.com. My phpNuke site is at linux.stephenwest.org.

I would appreciate some advice.

Thanks,

Steve.

PS) Please don't flame me for having a political web site. I am here as a fellow Nukie Wink






First off did you place your code you tried to post up in the code tags like so:
Code: :
[code].......PUT CODE HERE......[/code]

If you didnt try reposting the code Smile

Then we will try an sort out your problem






Thanks for your reply. I have tried doing what you said. If I hit preview of submt, it sends me straight to the main page. Can I e-mail you the code?

Steve.






Ok well predominantly you were posting JavaScript rather than HTML, JavaScript will get block as a security precaution by PHP-Nuke (well most of it anyway). So thats why you couldnt post your code up or at least thats what should have happened but aparently there is something else wrong and we are looking into it.

Anyway onto you problem, after looking at your site your news feed is almost identical to a block within nuke so you would probibly be best to create a blcok file and place the News Feed on your site that way.

The way blocks work are, they out put a variable called $content and whatever is in that variable is printed (echoed) onto the screen, for example if you put the following code into a file and call if block-News_Feed.php and place it into the blocks folder in PHP-Nuke you will then be able to select the block file from the Admin -> Blocks Section and place it whereever you want on your site. I have tested this and it works.

I had to email you the full code as i coudlnt post the javascript bit. Also make sure you call the file "block-News_Feed.php", other wise it might not show up in the list in the Admin Section.

Code: :
 WILL POST CODE HERE WHEN WE GET THE CODE SECTION FIX


Like i said i have tested this and it works you just have to adjust some of the settings in your javascirpt to make the colors and that suit your sites theme

Enjoy Smile






That's great. I'll look forward to receiving the e-mail.

It looks like I have accidentally found a small bug in the system so perhaps I have done you a favour Smile






Well it was working up to a day or two ago, so must be something we have done in the meantime so at least we know about it now






I have the file and will let you know how I get on.

Incidentally, the web site URL is http://phpnuke.stephenwest.org






The server has gone down at the moment but I've got plenty of other stupid questions to ask .............. but I'll search through the forums first Wink






It works 100% - thank you very much for your help Very Happy






Just one question following up from that .....

So can I assume that I can put any HTML code in a block and it will work?

Steve.






In theory. Smile




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS