Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Can someone tell me more about tagging systems like facebook, youtube, instagram and similar sites have. On posts and photos...
If you have some examples it would be great and don't ask me for code because I didn't done any of coding... In my mind it is something mixed with live search that starts after some symbol like $ or # or something else and on click on some value it shows that value inside text where you typed it....
I know it is mostly ajax but if you have some examples it would be great. Thanks
Tagging is like Comments. You have to make sql table, put a reference to the item that it's tagging, to the tagger, tag contents like the person that we tagged, and some additional datas of tag (like the position of the tag in a photo).
So we will got a table like this:
ID ID_IMAGE ID_TAGGER ID_TARGET tag_position_x tag_position_y
Now that you have made you table you need to build a php page where you will retrieve the tags. Then you need to make the front end code, which will need some js code so that the tag will be placed in position(tag_position_x,tag_position_y) in a photo. This can be done like this:
//some css code
container_img{
position : relative;
background : rgba(0,0,0,0.7);
}
.tag{
position : absolute;
}
and the js will be like (in jquery):
$(".tag").each(function() {
$( this ).css("top",$(this).data("position-x"));
$( this ).css("top",$(this).data("position-y"));
});
Now what I gave you is hints so you know what you have to do.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I've hit a bit of a road block I'm not sure how to add font styling i.e. bold font and also links.
I'm trying to get something like what brian over at backlinko has, which can be seen in this image below
I've only managed to achieve this:
Any ideas or suggestion to be able to achieve adding links and font styling to WordPress manual excerpt would be brilliant.
I was totally overthinking this and thought it was more complex than it actually was.
All I had to do was write the HTML inline in the manual excerpt box like this:
People that succeed with launching a new blog do one thing very well:
They build an email list! But in most cases, they do this before even launching their blog.
But you're probably wondering:
"How do I build an email list before I've even launched my blog?"
I'll break it down into three simple actionable steps that you implement yourself.
[alert-note]<strong>Free Checklist:</strong>Download a free checklist that shows you exactly how to use the strategy from this post (step-by-step).[/alert-note]
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Take yahoo as example,
how to control the following? (to make it simple, the result apply to the all countries)
title
description
can select which six page to show in search result?
six sub-title and their short description
Studied a while and found that the result are auto detect , so how to manually change them and how to make sure the changes since it take some time before the new search result is take effect?
http://support.aarcade.net/how-do-i-update-or-change-the-google-search-results-for-my-site/
thanks a lot
Title for each page including sitelinks (those six pages underneath) is from <title> tag in the page <head>.
Same goes for Description, those are from <description> tag.
Keep in mind that Google can alter or change them completely based on the page content and title/description provided.
You can't choose witch sitelinks to include, Google choses them automatically. But you can demote them with Webmaster Tools.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am working on a form completion view that needs to be easily copied. One of the inputs is a that displays multiple lines. So person can type out something that looks like this.
Dear Bob,
I am here to do this.
Thank you
SirRahal
I then take that data and store it into a database as varchar(1500) latin1_swedish_ci. The issue is that when I try to display this data in anything other than a it combines all the lines into 1. Example the not above would display like this:
Blockquote
Dear Bob, I am here to do this. Thank you SirRahal
The reason why I can't use a textarea to display it is because it doesn't copy and paste friendly.
Questions:
1) Is there another way of displaying this correctly?
2) Are there hidden characters in the string that I can use to identify in php and parse the text?
This code does work but I can't use a textarea:
<textarea>
<?php echo $model->description;?>
</textarea>
I believe you need to add nl2br when you output, e.g.
<?php echo nl2br($model->description);?>
Use CSS, and set white-space: pre on the container of the text.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm having multiple images (all which are clickable and have a value associated with each) on a page. Now I want to click any of the images (representing images) and that value is stored in array. So lets say I choose image of drink then meal then extras so everytime I choose one, it is updated in array as element. I am planning to do this in PHP so i was thinking something like PHP self submit? any illustrations are helpful...
Each time I add an item, I need a counter on the same page to increase/increment...
Thanks in advance and appreciated
You'll have to use a very little bit of Javascript there, give the images an onclick-tag with an redirection or bind an event via jQuery. If you're experienced with jQuery use that otherwise use the onlick tag to append the id of your image.
example:
<img src="picture.png" onclick="window.location = 'index.php?meal=1';" />
You have to echo the id's in PHP of course.
You cannot do that only with PHP, as PHP is only executed before the page is shown.. You need to use Javascript and maybe AJAX to update your data on your back end.
Your best option is to add those highlighted items in Javascript and then send it via AJAX to your php handler.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am updating 100,000 records. So the page looks blank while the update query process runs on the backend. Can someone tell me how to display the text "Please wait blah blah" until the update ends?
Well depending on your script and the structure, the easiest way would be to change a div's css property called display. When a user clicks on a link that starts the php script, you could add a javascript code like :
$(#+THEIDOFYOURDIV).show("slow");
});
and once its done, you can call another js function to close it like :
$(#+THEIDOFYOURDIV).hide("slow");
});
*NOTE I am using jquery functions, so you would need to include jquery in your pages.
There is another way you could do this using php ONLY, I had the same issue so take a look at this: how to show results while a php script is still running