RUVIDEO
Поделитесь видео 🙏

How to Create a Twitter Shortcode

http://www.byobwebsite.com/answers/how-to-create-a-twitter-shortcode/
Okay so... since we still have more time and we don't have any more questions, I'm going to take this whole short code question another step further. And the next thing I'm going to do is I'm going to create a Twitter short code and this Twitter short code is going to be the kind of link that encourages or that posts the post to Twitter. And so I'm borrowing the code here from let's see... from WP recipes. They've got this little piece of... well, I guess it's HTML code. They've got this bit of WordPress code, it's an HTML link really that I'm going to turn into a short code.

And so we're going to start back to custom functions php. This is... yeah, that's mine. It's the one I'm working on. And so I guess first off, I'll just get full copy... this function defines our... Twitter short code. And function byob Twitter... and again that... let's see. Is that going to require content? You know, that doesn't require content so I don't need those... I don't need this atts another content = no. I can leave that blank. And so I'm going to... opening and closing brackets and then I gotta go back and capture that code again. Okay, get full copy comes back over here and I want to say byob... oh I don't want to assign. Byob_twitter... twit. Byob_twit = and then I'm going to paste that code. So let's see if that works actually.

So we've got this... currently reading and then there's the permalink so I'm going to stop it there actually and drop back down and again say, byob_twit = whoops... it's dot equals. Dot equals and then quotes. Actually, not a quote. Actually, I'm going to rid of that php and I'm going to get rid of this and I want to drop it down again and say $byob_twit.= and then a single quote. Title click to send this page to Twitter, target = blank show on Twitter a and then that. Okay let's see this suggests we have a problem here. AH ref =. What is the problem? I'm missing something. Oh yeah, I'm missing the semi-colon. Okay so this is concatenation symbols so byob_twit = this plus this plus this and then create a short code so add short code... and then opening and closing parenthesis and I think I'll just say twit. And then opening and closing quotes again and byob twitter, the name of the function, and then a semi-colon at the end of that. Okay and then we are going to go ahead and save this.

So we've created this little bit of HTML, a little bit of php concatenate...oh we need the return statement, that's right. So now we need the return and then the $byob_twit semi-colon. Okay so that's going to return the contents of this to the location. We do that and let's go ahead and save this and then we'll come over here and we'll upload it. And then we're going to go to the site and I think what I'm going to do here at the very beginning of this is just to twit. So twit and update it. I'm going to refresh this and there it is. Share on Twitter. You can see the title -- click to send this page to Twitter. And if I click that, it brings up my login for me to add it and so there you go. We've got a little short code that... so you don't need a whole plugin. You can put a little short code in that will do this instead.

And I guess since we have 10 more minutes, we could substitute out the link for an image. So we could simply remove that, save it, and then I've got to come back to the site here. I've got to go and get a piece of... and image for this. So we will go to Media Library, add New, select file. I'm going to go to the place where I have my icons, my website's graphics. Icons... I think that this Twitter ping is probably what I want so open that up. The file is empty. Okay, select a file again. Okay, Twitter ping. Oh let's try a different uploader. Now choose a file and data, websites, graphics, icons, Twitter ping. Upload. Okay, there it is. So now we'll edit it and we'll copy it. And let's come back over here for a second. So I think I need to say class = twit. Yeah I need to add a class to that and then here what we're going to do is .twit a. And we're going to say background image URL. Okay, there's the URL. Close it, semi-colon, background image and then we're going to say height:... I think that's like 32 pixels. 32 px... width colon 32 px. Okay, so we have just defined a thing. We've defined the a. We've got a height and width of 32 pixels and it's got a background image. So we'll go ahead and save that and we'll go ahead and save that. And we'll upload them and let's see how that works.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to Create a Twitter Shortcode», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.