Does anyone know how to solve this... i have css and js link placed in head but when i reload a block the code can't find the css or js anymore. I use this to popup litebox simalar to fancybox popup. (reason why i use litebox is that litebox can show all type of files not just photos)
note: it works just fine on reload page.
|
Exactly what do you mean by "reload a block"? My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
BTW... Fancybox can load all kinds of content My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
BTW... Fancybox can load all kinds of content
oh ok... did not know that.
i reload my outline block and for the photo and video events i use code that people can see the photo or video in popup. so i need to know how to make that work after reload block and now just on page reload.
|
BTW... Fancybox can load all kinds of content
oh ok... did not know that.
i reload my outline block and for the photo and video events i use code that people can see the photo or video in popup. so i need to know how to make that work after reload block and now just on page reload.
Reloading the block should not affect the css and js loaded by the header. I would check using Firebug or Inspect Element (Chrome) and see if reloading the block is removing the code needed by the js. I would think it is more likely the bits needed for litebox are getting removed.
Geeks, making the world a better place |
Thanx GG i will do that... |
when you are reloading the block, are you loading a different page name?
What I mean is, (and I will do my best to explain, cause I had a similar issue) by default a block has code that is displayed on that particular page, and it will use the css and js from the header of that page. When your users click the link you created, is your link actually to another page that is just loading in that block? if so, do you have require 'inc/header.inc.php' on that page that your are linking to. In my case, I had to add that to my page so that when it was loaded into the block it would use the css and js from the site. The way I look at it is like an iframe. Although it is on a specific page, it is not part of that page, but a page all its own. I hope that makes sense. In my head I know what it is doing, I just can not explain it that well.
caredesign.net |
thanx ProfessorSr it is the outline on the index page.
The title of the page is my site name.
|
The first thing you should do, is ditch litebox and use fancybox, because it's already included in Dolphin. Use the resources you already have. My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
lytebox has better looks better i think.
but i am willing to give it a try..
how do i make a call to the fancybox ?
i have build in the a href link around the image and video thumbnail into the php event code for the outline.
can you give me example please...
|
If you want to see if it makes a difference or not you can go here and see what I did for photos in the regular photo block.
http://www.boonex.com/n/using-fancybox-for-photo-thumbnails-to-view-larger
Geeks, making the world a better place |
If you want to see if it makes a difference or not you can go here and see what I did for photos in the regular photo block.
http://www.boonex.com/n/using-fancybox-for-photo-thumbnails-to-view-larger
thanx GG but i tried that already and did not solve my problem.
|
After careful consideration, I have come to the conclusion that fancy box sucks. LyteBox worked on the first try.
Attached are all the files to popup front page outline item in a LyteBox window. FancyBox choked on some of the content I tried to pop up, but LyteBox handled it with ease. The attached files include:
/plugins/lytebox/ (Latest LyteBox Version)
/modules/boonex/wall/templates/base/outline_item_image.html
/modules/boonex/wall/templates/base/outline.html
Tested on Dolphin 7.1.4
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
yeah i'm glad you tried it yourself.
looks good right!
|
okay now to understand my problem i have on the index page.
Now try to create a <a href link and try to just reload the outline block. when you do that the popup doesn't work anymore and that is just my problem.
use this onclick='javascript:loadDynamicBlock(block_id, '/index.php?dynamic=tab');' so after the reload the link to the css and js is broken or gets killed and i don't understand why...
|
After careful consideration, I have come to the conclusion that fancy box sucks. LyteBox worked on the first try.
Attached are all the files to popup front page outline item in a LyteBox window. FancyBox choked on some of the content I tried to pop up, but LyteBox handled it with ease. The attached files include:
/plugins/lytebox/ (Latest LyteBox Version)
/modules/boonex/wall/templates/base/outline_item_image.html
/modules/boonex/wall/templates/base/outline.html
Tested on Dolphin 7.1.4
Yes, the version of fancybox that ships with Dolphin is an older version. Fancybox has been upgraded but the licensing changed with the newer version. All Dolphin is doing with it appears to pop-up the attached image in a blog post. And all I did with it was to handle single image viewing of photos.
I did not use fancybox for the slideshow viewer of photo albums because the old version of fancybox requires some code rewrites to make it handle auto slideshow viewing (not having to click on the next button to see the next image). I can not remember the slideshow viewer I used at the moment but it works well and was easy to implement on the album browse page.
Thanks for the lytebox work, I may have some use for it on my site.
Geeks, making the world a better place |
RE:
okay now to understand my problem i have on the index page.
Now try to create a <a href link and try to just reload the outline block. when you do that the popup doesn't work anymore and that is just my problem.
use this onclick='javascript:loadDynamicBlock(block_id, '/index.php?dynamic=tab');' so after the reload the link to the css and js is broken or gets killed and i don't understand why...
You didn't say where you were loading lytebox.js & lytebox.css
Had you studied the files I attached, you would see that I loaded those two files in the outline container and not the main page header. Load those two files like I did and see what happens.
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
Yea as HL said. You need to load them as part of the content of the jquery call.
The reason is as with most javascript, litebox is initialized on page load and at that time it locates all the images. Once the box is reloaded litebox looses all of that information. This is a common with a lot of JS code. So it cannot be placed in the head as the instructions say to. https://www.deanbassett.com |
RE:
okay now to understand my problem i have on the index page.
Now try to create a <a href link and try to just reload the outline block. when you do that the popup doesn't work anymore and that is just my problem.
use this onclick='javascript:loadDynamicBlock(block_id, '/index.php?dynamic=tab');' so after the reload the link to the css and js is broken or gets killed and i don't understand why...
You didn't say where you were loading lytebox.js & lytebox.css
Had you studied the files I attached, you would see that I loaded those two files in the outline container and not the main page header. Load those two files like I did and see what happens.
Yes in the past i had it in the outline.html file too and that works as long as you load or refresh the whole page. But when you reload just the outline block it doesn't work anymore as soon as you click load more or reload the outline block. And that is my headache for the last couple of weeks...
|
You should probably post all the code you are using.... and exactly where you are using it. My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
1. on index page i have a select field with module options. like videos, Photos etc.. this adds the filter value to the BxWallModule.php There i use this filter to filter the outline list.
2. On change of select i call: javascript:loadDynamicBlock(69, '/index.php?dynamic=tab')"> 3. in the outline.html i added
<!-- Load LyteBox Files Start -->
<script type-"text/jacascript" src="plugins/lytebox/lytebox.js"></script>
<link type="text/css" rel="stylesheet" href="plugins/lytebox/lytebox.css" />
<!-- Load LyteBox Files End -->
now when you load the whole page it works fine but when you click load more or change the filter value and the outline block reloads the popup doesn't work anymore.
this is in short my way to filter the outline and i hope it make sense
|
Maybe someone else can offer advice with the limited information you have provided, but I know I can't. My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
Maybe someone else can offer advice with the limited information you have provided, but I know I can't.
Don't make core changes if your not an experienced Dolhineer, your updates/upgrades to 7.1.5> will be difficult to say the least.
ManOfTeal.COM a Proud UNA site, six years running strong! |
thanx for the help and advise
i keep track of my changes and backup all my files. And when there is an upgrade i have to update many files anyway so this bit of code won't hurt me :-)
|