As in title, I can't get flowplayer to work on the same page with lightbox2 (I use this last one to display galleries). When I put lightbox2 and flowplayer js's at the beginning of the page, nothing works. If I put only flowplayer js's, it works, the same with lightbox2. Anyone know how to put these to in a way, which both of them would work?
UPDATE:
I don't believe it was so easy. I only change "$" to "jQuery" in flowplayer script in page ($(function() {flowplayer("id" ... to jQuery(function() {flowplayer("id" ... ) - and it worked!
Related
Sorry for the length, my problem is very simple, but specific.
I'm building a wordpress site that automatically imports image galleries from a Tumblr account, then styles and displays them. The backend is finished, and all that I need now is have all images in posts be displayed as thumbnail sized links. They are not behaving well with the importer (I've tried 6), so I have to edit the HTML display (rather than the images as they are uploaded).
I have decided to do this by applying class="attachment-thumbnail size-thumbnail" on all images on the site (in HTML). I have tested this and they will open the proper gallery in a lightbox as necessary so long as they belong to those two classes.
I have a two part problem.
I do not know PHP past basic syntax, and while I can intuit most of what is happening I don't trust myself to edit Wordpress source code without understanding exactly what I am breaking.
From other answers I've learned that I should most likely edit the wp_insert_attachment() function in post.php under wp_includes/. I have found the function, but don't really know where to go from there, as it does not appear to be specific to image attachments. I don't want to throw any errors by assinging image classes to non-image attachments. How do I add those two classes (attachment-thumbnail and size-thumbnail) to all post images (and only images)?
There is a single exception to this rule. I want a large image on the homepage, and have it not be a link.
It seems like the way to handle this would be to allow page attachments to be handled normally, while attachments that are both images and attached to posts should trigger this:
if [attachment is an image AND is on a post, not a page]:
<img src="https://whatever">
becomes
<img src="https://whatever" class="attachment-thumbnail size-thumbnail">
tl; dnr: ^^ that's all I need to happen, in PHP, in the right file, in Wordpress ^^
Thanks!
So likely you will want to do it via php but instead you could do it with javascript ie jQuery:
<script>
$(function() {
$("body img").addClass("attachment-thumbnail size-thumbnail");
});
</script>
Put that on any page or site header and it will add the class to all images. You can modify the search filter to suit.
You might need to re-call your lightbox initialization code too, or put this before it gets called initially.
I'm new to dnn and 2sxc.
Just wondering if I'm adding for example a card template (image,some text, a link), adding in the html template link tag to css/js, when adding that content more times in the page obviously the link tags are replicate in page source and it isn't so nice.
For example:
<script src="[App:Path]/script.js" type="text/javascript" data-enableoptimizations="100"></script>
it is going to be replicate in page.
Maybe I'm missing something, there is a better way to do it?
Thanks you :)
If you tried it, you should see that it will only be included once, IF you have the data-enableoptimizations included :)
So allready taken care of
Maybe i found the issue...
When I edit a template, selecting Html snippets in the combo to the right, then click on css, style-sheet it is writing a demo link tag, but it is not adding the type (type="text/css"), without it seems not work..
Maybe it could be fixed in a next release :)
I am building a page on Wordpress that has a DIV and inside that DIV there are many DIVs that share the same class, which I would like to paginate. I found a nice jQuery plugin that works fine on another page (not Wordpress). On the WP page, it initially shows the number of DIVs I set for pagination, but when clicking on NEXT/PAGE/PAGE NUMBER it shows nothing.
Works here (not Wordpress):
http://roshtof.co.il/second_hand.php
Doesn't work here:
http://roshtof.co.il/wp-rosh/%D7%98%D7%99%D7%A4%D7%99%D7%9D-%D7%9C%D7%9E%D7%AA%D7%95%D7%A4%D7%A4%D7%99%D7%9D/
Your plugin is working fine thats why it has brought up 16 items into 4 pages and does all initial work for you. There is an error on line 327 , 328
<script>
$("#leftTip").load('http://roshtof.co.il/wp-rosh/%D7%98%D7%99%D7%A4%D7%99%D7%9D-%D7%9C%D7%9E%D7%AA%D7%95%D7%A4%D7%A4%D7%99%D7%9D/ #tips-for-drummers:first-child');
</script>
You need to put this code inside dom ready event and it would work. Nothing to do with wordpress. All wordpress does is throw out html and js for you so once you have this issue fixed then it would be all fine.
Because of the js error the scripts on paging click are not working. Other stuff might be broken as well due to js error.
I have a YouTube video embedded on a page in ModX. To place it, on the Page I switch TinyMCE off to reveal the HTML code then paste the iframe in. That works Ok but when I go back to edit something else in HTML mode the iframe code disappears.
Anyone know whats going on?
TinyMce is encoding some of the characters in your youtube code for you... it honestly thinks it is being helpful ;) . You have 3 options:
Reference the tinymce documentation, there are some options to tell it which characters not to encode. [sorry, don't remember offhand what they are]
turn off "rich text" on the particular resource you are trying to include the video in.
place your video code in a chunk & reference that chunk in your resource instead of the actual code. [probably your best bet]
I want to add some javascript in wordpress, something like
if(iNum==0&&iNum+1!=l)
It shows up wrong, in the source code I found & became & how do I solve it? Thanks.
if(iNum==0&\& iNum+1!=l)
Where did you put that code?
To insert arbitrary javascript code, you need to use HTML mode in post / page edit window.
To do that, just click on 'HTML' just above editor window (to the right of Upload/Insert tools)