Drupal lightframe / lightboxs not working - php

This should be an easy one for someone I hope. I have had a Drupal 6 job land with me and I know nothing about it. What I'm trying to do is use an Iframe in a lightbox. I did a bit of a google and come up with somthing but the code editor will not let me do it.
The on-page source editor you get if you go to page->edit->source seems to remove some of the code i put there.
I put in:
Search google
and save it. I get no ligthbox, just a link to google. If I go back in to the source editor all I can see is this:
<p><a rel=" auto;]" href="http://www.google.com">Search google</a></p>
I can get the lightframe to work with just rel="lightframe" but I need to resize it. Any ideas?

make sure your input format is set to full html, or filtered html. Otherwise, if its not set to this, drupal will filter html code out.
Hope this helps

I believe this is due to colons in your rel attribute. Check out your issue on the issue tracker here. There is an explanation of how to fix this as well as a patch you can apply.
What's happening is that your rel attribute is essentially being cleaned, or filtered out, likely by security oriented filters (Input scrubbers for example) that are active in your project. You could disable them, but they are likely more useful to you enabled.

Related

How can I keep field data from being escaped and preserve html and image styles in CodeIgniter?

I’m using CKEditor and KCFinder to build a relatively simple CMS. Currently, things are working pretty well. I noticed an issue, though, when I started integrating images into the mix. The links for the iamges are comign back wrong. It looks like CKEditor might be changing the quotes, etc, on me. It looks correct when I look in mysql but it doesn’t always look correct when I look in the editor but it’s definitely not. Most of the time it does, but this time it came back looking like this:
<img alt="" data-cke-saved-src="http://placekitten.com.s3.amazonaws.com/homepage-samples/200/287.jpg"
src="http://placekitten.com.s3.amazonaws.com/homepage-samples/200/287.jpg"
200px;="" height:="" 287px;="" float:="" left;"="">i
For example, look at this page here: http://testosm.phpfogapp.com/pages/index/1/3/
I have all the code posted here: https://github.com/jshultz/monkey-cms in case you want to see what I was doing? Any feedback would be appreciated.
UPDATE:
I have turned on global_xss_filtering and the data is definitely cleaner now. all the styling was removed. Unfortunately. it’s almost perfect. Now, if I could just keep the image styling it would be perfect!
I figured it out. It was the XSS_Clean function. It was stripping out the styling. Good to know.

PHP Tab implementation

I am trying to implement tabs within one tab and I would like some help with it.
I found some codes for the upper tab and tried to implement them into the lower set of tabs. These codes are not mine. I simply put them together to display what I wanted which obviously doesn't seem to work properly...
The following is what happens:
1) If you click on the upper tab, the page doesn't refresh itself.
2) If you click on the lower tab, the page refreshes itself and changes the "id=?" on the address bar which is what I DO NOT want.
Will it be possible for this problem to be fixed?
This is a SAMPLE website so it will not be tidy
http://www.swan10.nl/stuff/testie/testie.php
The CSS were made to display classes however the PHP website only works if these codes are used class="TabView" id="TabView". I know you cannot use "id" more than once so I even made another set of CSS & Javascript for id="Tabview2" etc but it didn't work so I didn't bother uploading them to save space.
I don't know if this is the best code to use but if they aren't please give some suggestions for better codes. Or I may have just missed something tiny and silly.
Please help & thank you in advance!
I highly recommend you look at the Tabs feature of jQuery UI. It will seriously remove all the headaches of trying to figure out logic yourself, it's super easy to set up and use, and LOTS of people use it so there is plently of good information and support floating around on them.
http://jqueryui.com/demos/tabs/

How do I manipulate the output of a PHP script when it is already manipulated by another (plug-in) script?

I take it you are confused. So am I, but I'll try to formulate this as well as I can.
The content management system I use has a third-party plug-in installed that manipulates the output of the pages produced by the CMS. That's what it's supposed to do, and that's why I installed it, but there's one small part of those manipulations that I need to get rid of.
The plug-in looks for the </title> tag in the HTML output and then adds an unwanted tag right after it (by replacing </title> with </title><unwanted tag>).
You might think, why not just dig into the plug-in source and comment out that particular function? Well, that's the kicker: the plug-in is encoded with Zend Guard, so I can't make heads nor tails of its source, and unfortunately the developer is not willing to assist.
One other manipulation that I was able to get rid of by myself, was the extra (and again unwanted) HTTP header it set for every page.
The Zend-encoded PHP file is loaded by a regular PHP file, and I was able to unset the above mentioned header by adding the following bit of code to the very bottom of this 'load file', before ?>:
header_remove("X-Enhanced-By");
It works splendidly, but that was about as far as my experience and research could take me.
The last thing, then, that I need to undo, is the manipulation of the title tag. I temporarily worked around it by changing all my </title> tags to </title >, but that seems hardly a proper workaround.
If I can unset the header by placing header_remove("X-Enhanced-By"); right before ?>, does that mean I can also use that same area to undo the addition of the unwanted tag after </title>?
Let's assume the plug-in replaces </title> with </title><base href="http://www.example.com/" /> on every page that is put out by the CMS.
How would I go about undoing that?
Depending on the CMS framework. Basically you should be able to create a hook/plugin which captures the output at a higher level than your plugin then regex the tags out.
I get it that the plugin installed already does that so it should be "doable"

Calling text from between specific HTML tags to use as data for a variable in PHP

Trying to add more functionality to my gaming site that's running Invision Power Board software. It comes with the ability to add custom BBcode, and I'm trying to make a tag that can use the poster's item name and use PHP to pick out the correct item file and display it as html in place of the tag.
My question is, how do I take [tag=option] and plug the option into a PHP switch's variable to allow a poster to define the case? The software would turn [tag=option] into <p><div id="item">{option}<br /><br /><?php switch goes here ?></div></p>.
I've run around google searching through W3C and this site and other random places and I haven't been able to find a solution to my problem. Maybe I just don't know what I should be looking for. Please help?
there is a way to do this..... i did something similar on an ajax chatbox, changing
:lmao:
into
<img src="/smileys/lmao.png">
depending on your existing form script to display code.....
mine only needed a simple str_replace, but all site configs are different
can you edit your question, and paste your php code that displays the page you want the divs to appear on.....
thanks.
edit....
maybe i should have read date posted before answering pmsl

sifr not working in browsers, but can see it in dreamweaver preview

this is my first time trying to use sifr, so pleave be gentle and forget my noobness :).
ive been having some problems getting sifr to work... when finally it looked like it did (the dreamweaver preview saw the font change), no browser can see it...
http://www.creatica.ro/in2itivetest/index.html
this is the site im working on.
thank you in advance for helping.
One of your javascript includes is returned as a 404, meaning you're referring to a non-existing file (js-file) from your HTML document.
http://www.creatica.ro/Scripts/swfobject_modified.js is the path of the missing file. Would make sense for that to screw up something to do with flash I reckon :)
Check where the file actually is and move it or change the URL to reflect the correct path.
PS: Nice site by the way. Even though I found the top menu slightly annoying.. (the hover effect feels over the top and sluggish)

Categories