Remove header & footer from published Google Docs Spreadsheet [closed] - css

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I found javascript solution for removing gridlines on Google docs spreadsheets (using "download as HTML" and then past javascript in Web Address Bar): works great !!
javascript:var v="none",e="defaultView",o="border",m="Color",w=function(a,b){if(document[e]){if(document[e].getComputedStyle(a,null)[o+b+m]=="rgb(204, 204, 204)")a.style[o+b]=v}else if(a.currentStyle[o+b+m]=="#ccc")a.style[o+b]="none"},q=function(a){a=window.document.getElementsByTagName(a);for(var b=0;b<a.length;b++){var c=a[b];w(c,"Left");w(c,"Right");w(c,"Bottom");w(c,"Top")}};q("td");q("table");
Was wondering if it is possible to make a comparable javascript to remove the header and footer for docs "publised" to the web?!
Published spreadsheets have a
-> header: filename + sheetname;
-> footer: "Edit this page (if you have permission) – Published by Google Docs – Report Abuse – Updated automatically every 5 minutes"
-> example: TEST (I already added "&gridlines=false" to the url to remove gridlines).
Why is previous solution not sufficient ?!
I want some people to view and print the result of a spreadsheet (via publish to web) without giving them access (view) to the spreadsheet itself. Therefore they can't use "download as HTML" + your javascript, but want to provide a url to view a published site and be able to make a neat print without the Google header and footer.
Would be great if anyone could help out!
Regards,

Thankfully the layout on this page is super simple.
<div id="header">...</div>
<div id="content">...</div>
<div id="footer">...</div>
You could write a function like this to hide the header and footer.
var f = function(id)
{
document.getElementById(id).style.display = "none";
};
f("header");
f("footer");
Or the copy paste version:
javascript:var f=function(id){document.getElementById(id).style.display="none";};f("header");f("footer");

I built an app that does just this + improves the default layout. Check it out: http://gdoc.pub

You can use the range parameter to get rid of the headers and footers, as described here.

Related

How easy is to checkout the plugins being used by a wordpress website [closed]

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 7 years ago.
Improve this question
I was going through a site and saw that site is developed in wordpress. However, when i land on below page. I am unable to understand whether they have used a wordpress plugin or api to develop functionality:
https://legaldesk.com/affidavits/affidavit-for-change-of-name
Above link shows me a form when I select any city and click on create agreement. It asks for my details and on the right it shows preview.
Please answer . If this question should not be asked here, please do let me know the right site on which I can ask this. I like learning new technologies.
The forms themselves seem to be from "TemplatesForm" sourceforge.net/projects/kobject/files/kobject-java/tests/tests/…
Generally, the process of finding which plugins and scripts is one of a kind of forensic detection using, on the one hand, direct links to scripts' sources, which lead to the publisher's url and on the other, class names and other names or function calls, for example, found in the HTML.
Apart from obvious signs like "Powered by WordPress" or similar lines which some sites will have clearly displayed on them, you can find out a lot from the HTML page source.
Right click your page, select "view source" and search for, for example, "plugins" in the paths you find. One plugin used here is http://codecanyon.net/item/mega-main-menu-wordpress-menu-plugin/6135125 MegaMainMenu also Woocommerce, LayerSlider http://codecanyon.net/item/layerslider-responsive-wordpress-slider-plugin-/1362246 and FlexSlider https://www.woothemes.com/flexslider/
In this case, this is the theme - http://themeforest.net/item/envor-fully-multipurpose-wordpress-theme/9251688
They are also using Visual composer WYSIWIG plugin to help build it. codecanyon.net/item/visual-composer-page-builder-for-wordpress/…
You can launch scripts in browser windows as text by clicking on links to them in the HTML itself (at your own risk but it usually pops up in the browser as text) and you will often find the licence agreement texts at the top of the script.
You can see what national language the script has traces of to establish nationality (for example the forms scripts have traces of French in their variable names, which match with those on this site) This will help to confirm if you have discovered a script which was produced in the country you expect.
You can also see what programming language is involved, to help in your search and understanding of how the site works.
Website traffic in this case is monitored by Data Sumo Me https://sumome.com/ and Google Analytics. Also the Yoast WordPress SEO plugin is used. The URLs and names here are fairly obvious in the page's HTML and in HTML comments.
The part that pops up the overlays wordpress.stackexchange.com/questions/95661/… myModalLabel is BootStrap Modal - More on Modal Popups from http://www.tutorialspoint.com/bootstrap/bootstrap_modal_plugin.htm which seemed a very clear tutorial and explained the application of modal popups well.
More on Modal dialogue boxes - there is plenty you can do with those and they have been used extensively on this site en-gb.wordpress.org/plugins/modal-dialog modal-dialog for popup dialog boxes - you may find other bits on this site, including the usual jquery, bootstrap and fonts/css.
Another script called "imageareaselect odyniec.net/projects/imgareaselect is used for selecting image areas.
As this question is a little "off topic" for Stack Overflow you should probably try on Wordpress StackExchange, wordpress.stackexchange.com though they don't actually recommend any specific plugins as a matter of policy. I am also not recommending any here, only answering your question as to what has been used here and hope that the focus on what actually makes it work will be of use and interest to programmers who read this answer.
I can't see any other ones indicated in your webpage example - there may be some I have not noticed, but this answer is also intended partly as an example of the forensic analysis processes involved in working out what powers a site, which is at least partly within the scope of StackOverflow and I hope you will be able to use it to help you complete the discovery of any I missed. This started out as a collection of comments but seemed to develop a life of its own.

How will a page with two Html elements that have the same ID affect Google Indexing? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have the following code:
<div id="myContent">
An image, or another div with some text... Lore ipsum ...
</div>
<div id="myContent">
Other divs images... and other content...
</div>
I know that the id of a html element must be unique. I am aware that W3C attribute description but my client wants to keep the DIVs without changing the id to a class or without changing the second id to have a unique name.
I was wandering, is this unusual way of writing html code affecting the way Google is crawling the page? Is Google indexing this as any regular page or is skipping content or lowering the rank because of this issue?
I can't find official documentation on how Google works on this issue and I am afraid this is affecting a dozen of pages that I will then need fixing.
Violating the unique ID won't necessarily cause problems for web spiders, but it may stop your markup from validating and will also have implications for anything that relies on the "there can be only one" nature of the ID attribute, such as a CSS selector or Javascript.
Your client is misguided. You're the expert. Pull rank.
For some pages, Google displays anchor links in the search result, so that visitors can directly jump to a section of the page.
If the page of your client would be one of those sites where Google thinks it would be useful, this would not be possible, because you'd need different ids for that, obviously.
However, Google will add these links probably only for pages with some kind of ToC (like Wikipedia). So this wouldn't work for your site anyway, because you wouldn't be able to jump to both of these div elements.

How to restyle Json from wikipedia api in mobile app?

I'd like to restyle part of wikipedia articles and embed these parts into mobile app.
I tried to use
http://en.wikipedia.org/w/api.php?action=parse&format=json&page=New_York
but text in json files contains formatting for mediawiki.
How to maintain links to other pages without a mediawiki platform, so that they are displayed within the mobile (or web) app?
e.g.
e.g.
<a href="/wiki/Wikipedia:IPA_for _English # Key" title="Wikipedia:IPA \
for English">
hehe, yes, this was one of my first questions when I did not know about programming with javascript.
It is funny how questions are posed when beginner :)
Here and then I will go back to old questions of mine and answer them if something useful to share.
To answer my own question:
it is possible to hijack a link.
using jquery here for simplicity, it is possible to select <a> tags that have a pattern and then bind a function to them.
Example:
$("a[href*='/wiki/']").click(function(e){
// capture the link
var link = this.href;
// do something else..
}

Google maps api v3 default icons? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Am I right in thinking that there's only ONE icon included in google maps, and to use anything other than that you have specify a URL for an image, and a URL for a shadow, etc etc?
Basically I'm shocked that all of the icons you can see if you create a "My Maps" map aren't available in the API. It should be as simple as saying "icon: greenPin", "icon: parking", "icon: tent", surely?
Seems bizarre that they've not included such a basic thing given how powerful the rest of the API is - why make us jump through hoops giving specific URLs to images & shadows?
Am I missing something?
At the very least where can I find a list of the official google URLs for these "built in" images, as I'm struggling even with that.
:-S
Google has refreshed the look of the icons (and other things).
The new default icon is
this one here.
Other icons with this look can be found/made here.
^(By editing that URL, you can get the icons with letters inside, other colors, different sizes, &c.)
Yes you are right, google default image is only one and if you want to another image you have to use URL.
http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png
http://www.google.com/mapfiles/marker" + letter + ".png"
here you can replace the letter with any alphabet.
The list is here & hosted by google. This lists them all(or most of them) out with the url to point to them.
Remember: They work with HTTPS:// and HTTP://
Using it:
marker = new google.maps.Marker({
position: latLng, // this var would be set before calling this
map: map, // this var would be set on initiating the api
title: 'The location of the Million Dollars!',
icon: 'https://maps.google.com/mapfiles/ms/icons/green-dot.png' // This is where you put the icon url
});

multiple frontpages in multiple languages [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a Drupal 7 multi-language(3) website. I have installed the Internationalization (7.x-1.0-beta2) module.
I have created for each language a page, and translate it into two others languages.
Now here is what I want to do: to set a kind of intelligent "front-page" to know what language is selected and set the front page (which I choose) in that language.
How can I do this? I know that in Internationalization module, there is no such kind of thing, am I right? If I set the front page to nothing I get this message: “No front page content has been created yet.” which is normal because Drupal is asking me for one front-page to be set, however I want to have for each language a front-page.
Might be late to the party with this answer, but after many hours spent trying to solve this myself, I've the following solution.
For Drupal 7:
1- Make sure you have the modules Variable and Variable Translations switched on.
2- Goto admin/config/regional/i18n/variable
3- Select the 'Site information' list tab and check 'Default front page', save settings.
4- Goto admin/config/system/site-information, you'll notice a block of text there saying something about some of your settings being multilingual variables and a list of links for the languages you are running which allow you to set the settings for each language.
Now, this is where the real GOTCHA comes up... clicking those links and changing the settings does nothing. Your left with the same settings still for all languages. The way around this?
Check the URL you are currently on, the entire thing, so something like: http://www.example.com/en/admin/config/system/site-information/
Notice the language prefix there before /admin?? To change the settings for the other languages you want to use, switch the prefix in the URL and then make your changes. And now, as if by magic, multiple front pages, properly changing based on language.
This must be a bug in Drupal, I should get around to opening a ticket. But for now, if someone else comes across this, I hope it solves your problem too.
I've been searching for the same. I 'd like to recommend Drupal 7 - multi-lingual front page node which is complete and works perfectly for Drupal 7 projects.
After continuing to rip my hair out over this, I found out that this feature is incompatible with anonymous page caching!
Go to /admin/config/development/performance and turn off page caching for anonymous users.
May be there is a better way but finally he is how I did.
I have added in template.php the following code:
/**
* Implements hook_preprocess_page().
*/
function aelius_preprocess_page(&$vars) {
if ($vars['is_front']) {
$langcode = $GLOBALS['language']->language;
if ($langcode == "en") {
drupal_goto('home');
} elseif ($langcode == "fr") {
drupal_goto('accueil');
}
}
}
I haven't worked with Drupal 7 i18n yet, but in Drupal 6 you would add a site_frontpage variable to $conf['i18n_variables'] in settings.php and then switch to each language in turn and set the frontpage on the site information page.
Alternatively, you can specify a condition in your theme front-page.tpl.php like so

Resources