Like, Reblog, and Follow functions - tumblr

I'm trying to create a really Like, Reblog, and Follow function in my PermalinksPagination section of my coding on Tumblr.
It seems that most Themes place these functions between the {block:Posts} and {/block:posts}, but I am trying to put these functions in between the {block:PermalinkPagination} and {/block:PermalinkPagination}
Can anyone help?

To insert a like- or reblog-button, simply input this code wherever you'd like it to be:
{ReblogButton size="21" color="black"}
{LikeButton size="20" color="black"}

Related

how to create form like this by vuetify?

I want to create form like the picture above but i dont know how to do it? and i want to bind the data to parameter'quota'
data(){
return {
quota :'',
defaultquota:'-1'//which is defined as unlimited
}
}
I think taking a look into the vuetify examples would probably be your best best. What have you tried so far?
By looking at your picture, you can see that you will require one v-radio-group which will have 2 v-radio buttons. and a v-text-field that will be bound to your quota variable, result will be something like this:
<form>
<v-row>
<v-radio-group label="quota:" row>
<v-radio label="unlimited"/>
<v-radio label="input by yourself:"/>
</v-radio-group>
<v-text-field outlined v-model="quota"/>
</v-row>
</form>
You might want to add a v-model on the v-radio-group in order to figure out which option was chosen and set a default one if needed.
The form is simple, I added a for it to all appear in the same line as the picture. the outlined on the v-text-field will give it that boxy input look that's in the picture. the rest should be self explanatory.
I would strongly suggest looking at what examples and api vuetify has to offer on their main site as the more you look at it the more you will be able to figure out exactly what you need.
https://vuetifyjs.com/en/introduction/why-vuetify/#guide
look under the components in the navigation, all the components are listed there along with examples of using them and how they look, it will be very helpful!
Happy coding!

is there a way to add custom labels to doxygen output?

If you use doxygen, you'll have noticed how certain adornments can appear in the header bar for the detailed info for a given function. Here's an example, it has the inline adornment, another one I've seen is static and I expect there are others.
I'm actually using doxygen to document Javascript on a mixed C++/Javascript project and would like to put an async adornment into the documentation for functions that are asynchronous. I'm using Coherent labs excellent script to do to this.
So, is there a way to insert custom adornments? I'd like the syntax to be something like this:
/// #adorn async
I don't see a direct solution in doxygen for "custom" labels. Problem would of course also be that it should work for all output types.
In e.g. LaTeX / PDF the static is shown as [static].
In HTML I think the relevant part is:
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
Maybe you could do something with the css files / or embedding a javascript script in the HTML code.
Other solution would be to add a command to doxygen that handles this type of requests, but this would mean again a new command in doxygen.

how to display text in MultiCell() in fpdf?

I have a problem in FPDF. I want to use MultiCell() to display a text. my code is as follows:
$syarat .='<ol><li>aaa</li>
<li> bbb
<li> ccc</li>
<liddd</li>';
$pdf->SetFont('Arial','',7);
$pdf->SetX(10);
$pdf->MultiCell(190,4,$syarat,0);
//but the problem is it display also with , tags. How to appear numbering instead of , tags?. Thank You
In FPDF did not support the HTML tag ,you have to write it by yourself.
1) if you want to do like this: you can try with HTML->PDF http://html2pdf.fr/
2) You can do with multiple cell Please learn from this exampel
http://www.fpdf.org/en/script/script3.php
If you need help from the example ,Please let me know.
FPDF supports HTML but you need to use a script such as: http://fpdf.org/en/script/script53.php
This one claims that it has full support for lists <li>.
To make the numbers appear, you can always do that manually, for example:
$syarat .='<ul>
<li>1. aaa</li>
<li>2. bbb
<li>3. ccc</li>
<li>4. ddd</li>
</ul>';
Other scripts are available here, but I don't see another one that supports <LI> tags.

Convert links in blockquotes to plain text

So, I've been asking a lot of Xpath questions recently.
Sorry, but I've only just started using it, and I'm working on a kind of hard project.
You see, at the moment I'm parsing HTML like this (not a copy and paste, just an example):
<span id="no153434"></span>
<blockquote>Text here.<br/>More text.<br/>Some more text.</blockquote>
And I'm using
//span[starts-with(#id, 'no')]/following::*[1][name()='blockquote']//node()
To get the text inside.
It's working fine, although it's very frustrating. I need to manually check for then manually combine the strings before and after the br, add a newline, and so on. But it stills works. Until there is a link in the text, that is. Then the code is like this:
<span id="no153434"></span>
<blockquote>Text here.<br/>Text.<br/><font class = "unkfunc">linkhere</font></blockquote>
I have absolutely NO idea where to go from here, as the link is included as a completely seperate item (twice) in the array. Atleast with the br I knew where it had to be moved to. Really contemplating giving up in this project after all this effort.
You can use this XPath to obtain text inside element: //span[starts-with(#id, 'no')]/following::*[1][name()='blockquote']//text()
So you receive following result:
Text here.
Text.
linkhere
If you want only text nodes and br:
//span
[starts-with(#id, 'no')]/
following::*[1][name()='blockquote']
//node()
[ count(.|..//text()) = count(..//text())
or
name()='br'
]
returns
Text here.
<br />
Text.
<br />
linkhere
The answer is to not use XPath for this kind of work.
Got it working 1,000,000x easier with Objective-C-HTML-Parser.

zend form - Element Label in two line

I am extremely new to Zend Framework, In registration form, i need label text in two line. For Example:- In the case First name, I need to display like below:
First
Name:
How can i implement this? Please anyone help me!!!
By default, input fields labels are being escaped by Zend_View_Helper_FormLabel. However, you can easy switch this off:
$yourTextInputElement->getDecorator('label')->setOption('escape', false);
This way you can use labels as e.g. $yourTextInputElement->setLabel('First <br/> name');.
What about this nifty solution ?
http://jsfiddle.net/J67GD/
The best way is probably to use Description decorator, or subclass one of other standard ZF decorators.
Yanick's CSS solution might be a good choice too, depending what are you trying to do.