MyBB Community Forums

Full Version: My Image Modal: Open image link and youtube link in modal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
(2015-03-09, 05:27 AM)martec Wrote: [ -> ]
(2015-03-09, 04:59 AM)nollidnosnhoj Wrote: [ -> ]
(2015-03-09, 04:50 AM)nollidnosnhoj Wrote: [ -> ]Issue:

One of the users in my forum tried adding a Youtube channel link to an image. When you click on the image, however, it pop-up a blank Youtube video.

Maybe have it work for Youtube video only instead of youtube url?

nevermind. it seems to work now. don't know what happened.

Nevermind. It's happening again. Whenever I post this link, which is a Youtube channel:

https://www.youtube.com/channel/UCyMp_NqB8PQbuwPF_1YcOhw

The pop-up will show with a blank video.

http://i.imgur.com/RGoNK8C.png

but this not support channel

yeah. but I want it to where it redirects me to the Youtube channel page, instead of popping up the video modal.
(2015-03-09, 05:30 AM)nollidnosnhoj Wrote: [ -> ]
(2015-03-09, 05:27 AM)martec Wrote: [ -> ]
(2015-03-09, 04:59 AM)nollidnosnhoj Wrote: [ -> ]
(2015-03-09, 04:50 AM)nollidnosnhoj Wrote: [ -> ]Issue:

One of the users in my forum tried adding a Youtube channel link to an image. When you click on the image, however, it pop-up a blank Youtube video.

Maybe have it work for Youtube video only instead of youtube url?

nevermind. it seems to work now. don't know what happened.

Nevermind. It's happening again. Whenever I post this link, which is a Youtube channel:

https://www.youtube.com/channel/UCyMp_NqB8PQbuwPF_1YcOhw

The pop-up will show with a blank video.

http://i.imgur.com/RGoNK8C.png

but this not support channel

yeah. but I want it to where it redirects me to the Youtube channel page, instead of popping up the video modal.

sorry, but I have no solution to this for now...
Okay. Thanks for the heads up.
V1.0.1 released

Fix issue with youtube link http://community.mybb.com/thread-168162-...pid1146151
i don't know why but i install and activated, click the link will re-direct to that link ...
(2015-03-13, 12:51 PM)Breaker Wrote: [ -> ]i don't know why but i install and activated, click the link will re-direct to that link ...

check if in headerinclude template

line below
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/myimagemodal.js?ver=1.0.1"></script>

appear above or below of

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1804"></script>

if apper above so change position of <script type="text/javascript" src="{$mybb->asset_url}/jscripts/myimagemodal.js?ver=1.0.1"></script> to below of <script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1804"></script>

if you can't find <script type="text/javascript" src="{$mybb->asset_url}/jscripts/myimagemodal.js?ver=1.0.1"></script> , so put <script type="text/javascript" src="{$mybb->asset_url}/jscripts/myimagemodal.js?ver=1.0.1"></script> below of <script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1804"></script>
the pop does not work if the image ends with capital JPG instead it opens it in new tab.
didn't tried it with other extensions but with capital JPG it does not work for sure.
(2015-03-20, 06:51 PM)Hamster24 Wrote: [ -> ]the pop does not work if the image ends with capital JPG instead it opens it in new tab.
didn't tried it with other extensions but with capital JPG it does not work for sure.

you can test with attachment of this post?
download attachment of this post and upload in jscripts folder.

after upload clean cache (F5 several times). If you using cloudflare, you need clear cache in cloudflare too or put your domain in development mode.
thanks for the update but i already fixed that in the JS file yesterday
good plugin

recommended your plugin on the mods website
I think I found a problem.

Both MyImageModel and the Image Resizer requires the javascript html code to be after:
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1804"></script>

If MyImageModel javascript is below the code above, then it will work, but the Resizer won't work. If the Resizer javascript is below the code above, then it work will, but the MyImageModel won't work.

Here's my headerinclude template:
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<link rel="icon" type="image/png" href="{$mybb->settings['bburl']}/favicon.png">
<link href='//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,200italic,400italic,600italic' rel='stylesheet' type='text/css'>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/resizer.js"></script> 
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/myimagemodal.js?ver=1.0.1"></script>
<script type="text/javascript" src="images/duende/jquery.tipsy.js"></script>
<script type="text/javascript" src="images/duende/jquery.cookie.js"></script>


<script type='text/javascript'> 
jQuery(function() {
jQuery("a").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("title").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("img").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("i").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("span").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("div").tipsy({gravity: jQuery.fn.tipsy.autoNS});
  });
</script>

{$stylesheets}{$myprofile_headerinclude}
<script type="text/javascript">
<!--
	lang.unknown_error = "{$lang->unknown_error}";

	lang.select2_match = "{$lang->select2_match}";
	lang.select2_matches = "{$lang->select2_matches}";
	lang.select2_nomatches = "{$lang->select2_nomatches}";
	lang.select2_inputtooshort_single = "{$lang->select2_inputtooshort_single}";
	lang.select2_inputtooshort_plural = "{$lang->select2_inputtooshort_plural}";
	lang.select2_inputtoolong_single = "{$lang->select2_inputtoolong_single}";
	lang.select2_inputtoolong_plural = "{$lang->select2_inputtoolong_plural}";
	lang.select2_selectiontoobig_single = "{$lang->select2_selectiontoobig_single}";
	lang.select2_selectiontoobig_plural = "{$lang->select2_selectiontoobig_plural}";
	lang.select2_loadmore = "{$lang->select2_loadmore}";
	lang.select2_searching = "{$lang->select2_searching}";

	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var rootpath = "{$mybb->settings['bburl']}";
	var imagepath = "{$theme['imgdir']}";
  	var yes_confirm = "{$lang->yes}";
	var no_confirm = "{$lang->no}";
	var MyBBEditor = null;
	var spinner_image = "{$theme['imgdir']}/spinner.gif";
	var spinner = "<img src='" + spinner_image +"' alt='' />";
// -->
</script>

www.tripulse.net
Pages: 1 2 3 4 5 6