moose-en-a-gant Posted January 11, 2015 Share Posted January 11, 2015 (edited) I'm not sure if this is possible Previously I had a problem of outputting rows of a specific query This was the solution that was given to me $txt .= $date . " " . $stratoparse . "\n\n"; Where a while loop's results were concatenated to a single string What I would like to do is output the results in individual containers with controls such as dragging for repositioning / an x for deletion That's not what I'm here for in this post I want to embed youtube videos, so they are not just stored as links, rather a clickable video so if you have something like string.string2.string3.string4.string5.<iframe src="youtube"...>.string7.string8 how would that video be isolated and parsed / understood as a front end youtube video ? To provide a brief background in case you are wondering why in my right mind, I would want to do this... First it is the primary solution that comes to mind going off what already works Secondly, the purpose or point of the concatenated string comes from the "application" design which is a store and recall interface. Vague, I know. The website has multiple users and they all have access to a single database. They save random strings, whether they are paragraphs or links, possibly videos that are uploaded, etc... these are saved by a keyphrase, later recalled by searching that keyphrase. Currently the output is nothing more than a concatenated string, that was fine initially but some of my friends have been testing the website and they made suggestions which are good such as repositioning and deleting entries. Now I want to automatically parse youtube links into embedded videos... I'll probably use that explode "function" to disect the link and place the url within the src=" " Anyway, I have to look into this but if anyone has any thoughts I'd appreciate it. Edited January 11, 2015 by moose-en-a-gant Quote Link to comment https://forums.phpfreaks.com/topic/293832-embedding-a-youtube-video-within-a-concatenated-string/ Share on other sites More sharing options...
ginerjm Posted January 11, 2015 Share Posted January 11, 2015 Why does your output have to be "in a string"? Design your output page and then write the html code to present it that way and THEN worry about how to get the data items into it. As for showing an image of a video. Not familiar with any of this but can you actually show an image (a single frame?) from a video file? Quote Link to comment https://forums.phpfreaks.com/topic/293832-embedding-a-youtube-video-within-a-concatenated-string/#findComment-1502535 Share on other sites More sharing options...
QuickOldCar Posted January 11, 2015 Share Posted January 11, 2015 You can try to parse patterns in text areas for hyperlinks or youtube related links and if matches can transform to a link or an embed code. I've done what you were wondering for chat messages in the past. Usually something like bbcode is used to tag around it so is easier to detect. It's easier to use a WYSIWYG editor like ckeditor , tinymce which have an insert for hyperlink,image and video. Quote Link to comment https://forums.phpfreaks.com/topic/293832-embedding-a-youtube-video-within-a-concatenated-string/#findComment-1502545 Share on other sites More sharing options...
moose-en-a-gant Posted January 11, 2015 Author Share Posted January 11, 2015 (edited) The output doesn't have to be in a string... it was how I solved the problem. As for showing an image of a video. Not familiar with any of this... I'm talking about the the thumbnail shown on youtube videos before they are played. So currently the output looks like this: This is a screen shot from the current interface on the desktop version. This is an outdated design, I've already redesigned it and hopefully it will implement the video embedding/auto-parsing as well as dragging to reorder / update / delete entries / change keeyphrase/topic So you see it's just simple text that I can't edit... I could save it as a new entry but it won't update the original. The problem isn't updating. If ideally I was able to output into individual rows (which I have done in the past without parameter binding) I could format each to have their own panel that can be dragged, etc... as shown in the ideal sample output below So... what should I do? I've formatted rows before to have a background, width, etc... using CSS, but that was without using parameter binding. Edited January 11, 2015 by moose-en-a-gant Quote Link to comment https://forums.phpfreaks.com/topic/293832-embedding-a-youtube-video-within-a-concatenated-string/#findComment-1502575 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.