Its been awhile since I worked on nuke sites and I totally forget how to enable graphics to work on PHPNuke sites. Let me explain...
Some old code I used to use for a home page on one of my sites looked like the following...
Code:
<div align="center"><br><img height="138" src="grafx/darkside_wave.gif" width="481" border="0"><br>Please bear with us as we work to develop the site <br>and bring you more content.</div> <div align="center"><br><a href="grafx/busa.gif"><img height="263" src="grafx/busa_small.gif" width="461" border="0"></a> <div><br>
this allowed some images to show on the page, in this case the code was used in the main story area, top of the home page.
I also regularly used code like that to show imges throughout the site, such as the NEWS areas, STORIES etc
Well, a few version releases back, Nuke disabled by default the use of image code on the site, I would assume its due to the fact that virii can now be embedded into bitmaps and .swf flash files can be exploited etc.
I would however like to re-enable the use of images....not only would I LIKE to...but NEED to.
I seem to remember that you could edit a file to unlock the ability, but forget which one...and the proper terminology to do so.
Again, as usual..I GREATLY appreciate any and all help here guys...
ALSO, the site theme already uses flash in the top left corner for a type of navigation, Home, Forums, Downloads etc. And UNFORTUNATLY it is VERY annoying these days, because now you get a popup message saying "Press SPACEBAR or ENTER to activate and use this control"
Again, I relalize that this was done by macromedia to help protect against exploits etc. But especially for flash navigation menus, IT SUCKS Rainbow Brite CRACK !
Is there any workaround to disable the "Activate this control" message ?
SO in review,...
#1 How do you re-enable the use of images in a Nuke site?
#2 Can you DISABLE the "Activation" gayness of flash movies?
that code is fine you also need to allow img in your config.php if your having trouble with images showing.
Code:
$AllowableHTML = array("img"=>2,"script"=>1,"javascript"=>1,"b"=>1,"i"=>1,"strike"=>1,"div"=>2,"u"=>1,"a"=>2,"em"=>1,"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1);
/* or just include "img"=>2 in the $AllowableHTML array bellow. This feature isn't included by default due to possible security issues */
$AllowableHTML = array("object"=>2,"col"=>2,"td"=>2,"tr"=>2,"hr"=>1,"p"=>2,"font"=>2,"embed"=>2,"font color"=>2,"table"=>2,"b"=>1,"i"=>1,"strike"=>1,"div"=>2,"u"=>1,"a"=>2,"em"=>1,"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1,"img"=>2,"img src="=>2,"center"=>1);
/* If you want to use the most common html tags you must uncomment the following line and comment the $AllowableHTML above this line but be aware that this option allows many html tags even to your registered users */
// $AllowableHTML = array("img"=>2,"tr"=>1,"td"=>2,"table"=>2,"div"=>2,"p"=>2,"hr"=>1,"b"=>1,"i"=>1,"strike"=>1,"u"=>1,"font"=>2,"a"=>2,"em"=>1,"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1,"center"=>1);
GnBanditoCI5 Corporal
Joined: Sep 15, 2004
Posts: 50
Posted:
Mon Feb 04, 2008 9:37 am
LMAO, DAMN IT !!!
Yea I finally found a forum post talking about editing the $AllowableHTML, where they suggested not only updating the config.php file, but the mainfile.php file as well, and also deleting a line from the modules/Reviews/index.php file
Code:
$text = urlencode($text);
Ok, so heres where im at currently....
I edited both config.php and mainfile.php, both updated with this code...
Now when I go to my home page, and click EDIT for the main news area, (basicly the main homepage info area), I then add this code
Code:
<div align="center"><br><img height="138" src="grafx/darkside_wave.gif" width="481" border="0"><br>Please bear with us as we work to develop the site <br>and bring you more content.</div> <div align="center"><br><a href="grafx/busa.gif"><img height="263" src="grafx/busa_small.gif" width="461" border="0"></a> <div><br></div><br></div><br><div align="center">NEW LOCATION !!</div><br><div align="center"><strong>**** ***** Ave. <br>*********, NY 123**<br>( Off of ******** Ave, by Wendy's )</strong></div><br><div align="center">(518) ***-**** </div><br><div align="center"><br></div>
(Ofcourse I edited out the phone number and addy to protect my client etc)
Anyway, I try to paste that code in, and click "Save Changes", and then navigate back to the home page...
Well, now I atleast see the darkside_wave.gif image showing ( dont think its centered as it should be), but nothing else is showing at all.
I then go back to "EDIT" and somehow a majority of the code I just put in is gone, and the only code left is
So, somehow it is removing (and not using) the full code I try to use ...
Code:
<div align="center"><br><img height="138" src="grafx/darkside_wave.gif" width="481" border="0"><br>Please bear with us as we work to develop the site <br>and bring you more content.</div> <div align="center"><br><a href="grafx/busa.gif"><img height="263" src="grafx/busa_small.gif" width="461" border="0"></a> <div><br></div><br></div><br><div align="center">NEW LOCATION !!</div><br><div align="center"><strong>**** ***** Ave. <br>*********, NY 123**<br>( Off of ******** Ave, by Wendy's )</strong></div><br><div align="center">(518) ***-**** </div><br><div align="center"><br></div>
The only thing I can imagine that is happening is....when it hits the "BORDER" code, it dont know what to do, it then does not use any code beyond that point.
So would I be correct in assuming that I would need to add
Code:
"border"=>1,
code to the
Code:
$AllowableHTML
in my config.php and mainfile.php files?
Again, I DO appreciate any feedback people....
And dont forget, still need feedback on the "Press SPACEBAR or ENTER to activate and use this control" issue im having with all .swf flash files as well.
I tried adding "border->=1", and "border->=2" to the config.php and mainfile.php, with no luck, didnt change anything.
Also added "p align"=>2,"div align"=>2, to address the not centered issue...no luck there either...
I then figured i might as well try to add a NEW STORY, and add the html code and see if it displayed the images in an area other than the default home page area ( you know, where it displayed..."Congradulations you now have a new portal, create a super user" message when first installing...
SO I thought it was worth a try to create the code in a different module so to speek...
Well, I was plesently surprised when I added the code..and chose the PREVIEW STORY option, it showed everything as intended...HOWEVER, when i chose to POST STORY, it did the same thing, showed the first image in the code, then deleted the ramaining code after "border"
So I am currenly at my wits end, and dont have a clue what to do next.
Needless to say, having the ability to add images and format it such as center etc, is NEEDED for the site I am building. Which is a Graphics business site.
I mean WTF?...why dont the nuke devs add a section under "PREFRENCES" with checkmark boxes for each code format option, such as ".gif" or "/b" text format switches????
Obviusly something isnt right considering that in the config.php file, they explain about the $allowableHTML code you need to update in order to use certain code, and being that I implemented this change, and I am unable to indeed display images...well...somethings wrong....
And so we all know, yes I have disabled the WYSIWYG editor in the config.php file
So I am seriously open to suggestions at this point guys....
You did not say what version of PHP Nuke you were using, and I have not looked at any of the versions higher than 7.6.
Anyway, since you said all is OK in Preview Story, but goes bad in Post Story, the issue may be where the data is saved into the database. I have a feeling there may be some kind of sanitizing/filtering going on before the data is saved that is causing your problem. Take a look there, (function for saving the data) for a possible solution.
SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
GnBanditoCI5 Corporal
Joined: Sep 15, 2004
Posts: 50
Posted:
Wed Feb 06, 2008 3:35 am
yea, i believe its nuke version 8.1 im using.
And yes, it looks good in preview, but not in post....and thats for just NEW STORY, I also cannot get the images to show in the regualr home page story module.
Please do not take this the wrong way, but the code you are using is most likely the issue. It is written about as horribly as can be written. sorry....
Here it is cleaned up:
Code:
<div style="text-align:center;margin:0 auto 0 auto">
<img src="grafx/darkside_wave.gif" width="481" height="138" alt="" />
<br />Please bear with us as we work to develop the site
<br />and bring you more content.
<br /><img src="grafx/busa_small.gif" width="461" height="263" alt="" />
<br />NEW LOCATION !!
<br /><strong>**** ***** Ave.
<br />*********, NY 123**
<br />( Off of ******** Ave, by Wendy's )</strong>
<br />(518) ***-****
<br /></div>
SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
GnBanditoCI5 Corporal
Joined: Sep 15, 2004
Posts: 50
Posted:
Mon Feb 11, 2008 4:21 pm
Not taken the wrong way at all bro, the code I was using was created using Namo Web Editor. And not done freehand !
I do appreciate your help, as that worked wonderfully !
Next delimaa is, now ill have to find another web editor that will work. I have no clue why Namo code started not working...I have used it for years with phpnuke.
Any suggestions as to why it would stop now?...as I would prefer to stick with it. I know there are much better editors out there like dreamweaver, which I already have and have installed, but I prefer to use namo. Just much more simpler and faster. For me anyway.
You may not like my idea... Why not learn how to code in html and only use an html/php/text editor? There are several websites offering free tutorials. Look on my website below in the forums for a listing of free tutorials.
OK... so now you ask, what is a good html/php/text editor?
For Windoz (I hate windows): Crimson Editor
For Kubuntu Linux (which I use now): Bluefish Editor
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