You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 54 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How to enable graphics such as .bmp, .gif, .jpg and .swf ??? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Mon Feb 04, 2008 8:04 am Reply with quoteBack to top

Hey again,

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?

Thanx again...and I EAGERLY await a reply...

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
movieman
Lieutenant
Lieutenant


Joined: Feb 29, 2004
Posts: 297

Location: New York

PostPosted: Mon Feb 04, 2008 8:46 am Reply with quoteBack to top

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);


Find all posts by moviemanView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressMSN Messenger
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Mon Feb 04, 2008 9:37 am Reply with quoteBack to top

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...

Code:
$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);


And deleted the
Code:
$text = urlencode($text);
from the modules/Reviews/index.php file

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
Code:
<div align="center"><br /><img height="138" src="grafx/darkside_wave.gif" width="481" border="


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.

Awaiting a reply....

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Mon Feb 04, 2008 10:18 am Reply with quoteBack to top

**UPDATE**

Heres where im currently at....

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....

Let the suggestions fly people !!!

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Mon Feb 04, 2008 12:04 pm Reply with quoteBack to top

Anyone?

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Mon Feb 04, 2008 2:48 pm Reply with quoteBack to top

ZZZZZZZZZZZZZZZZZZZ???????????

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Mon Feb 04, 2008 5:16 pm Reply with quoteBack to top

wait...was that a cricket chirping I just heard?

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Tue Feb 05, 2008 6:56 am Reply with quoteBack to top

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-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Wed Feb 06, 2008 3:35 am Reply with quoteBack to top

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.

Weird,...again...any feedback IS appreciated

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Wed Feb 06, 2008 6:44 am Reply with quoteBack to top

welll.... I was hoping you would run a little with the suggestion I gave you, so I see I need to break it down even more.

Please open the modules/News/admin/index.php file, and find:

function postAdminStory

within that function you should find 2 sets of 2 variables for:

$hometext
$bodytext

replace those 2 sets of 2 lines with:
Code:

$hometext = addslashes(check_words(check_html($hometext, "")));
$bodytext = addslashes(check_words(check_html($bodytext, "")));


See what happens then...

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Sat Feb 09, 2008 5:02 am Reply with quoteBack to top

Same deal, only the first image shows, then the code is stopped, and when you go back to edit it...its 75% gone.

This is really frustrating me, I have never had this many problems showing simple images on a nuke site.

Again, I DO appreciate your help, and am open to other suggestions...

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Sat Feb 09, 2008 5:04 am Reply with quoteBack to top

And as far as running with your suggestion..I am lucky I can even get my shoes on when it comes to php and nuke..LOL

I understand the basics of coding, hwoever am not very pvp or nuke structure proficient.

So again, I DO appreciate your help !

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Sat Feb 09, 2008 7:36 am Reply with quoteBack to top

wow....

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>


This should work now...

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
GnBanditoCI5
Corporal
Corporal


Joined: Sep 15, 2004
Posts: 50


PostPosted: Mon Feb 11, 2008 4:21 pm Reply with quoteBack to top

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.

Any ideas?

_________________
Peace 4 now...4 NOW !
Gn.ßändï†ö¤CÏ5¤
Clan International Online
Image
Find all posts by GnBanditoCI5View user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Tue Feb 12, 2008 6:04 am Reply with quoteBack to top

Smile 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

Both are free...

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.673 Seconds - 387 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::