GetSimple Support Forum

Full Version: Remove Footer in Innovation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm doing a bit tweaking for the innovation theme, and I would like to move the footer information into the sidebar. I removed the link to the footer.php in the default template (with comments), however, they still show up when I load the page. What should I do to remove them?

Also, I would like to add link to a page content in the sidebar.php. I found this page (http://get-simple.info/wiki/themes:template_tags) with the available tags, but I don't see the tag for which I can link to the page I created. Please let me know which tag should I use. Thanks.

Regards,
Angela
angelazou Wrote:I'm doing a bit tweaking for the innovation theme, and I would like to move the footer information into the sidebar. I removed the link to the footer.php in the default template (with comments), however, they still show up when I load the page. What should I do to remove them?
Below the call to footer.php is the actual content of the credits:

Code:
<div class="wrapper">
<div class="left">&copy; <?php echo date('Y'); ?> <a href="<?php get_site_url(); ?>" ><?php get_site_name(); ?></a></div>
<div class="right">Innovation-Theme von <a href="http://www.cagintranet.com" >Cagintranet</a> &middot; <?php get_site_credits(); ?></div>
</div>

If you'd like to transplant that into the sidebar, you have two options: either directly cut & paste the wrapper div or create a component which you'll put where you want the text to be.

angelazou Wrote:Also, I would like to add link to a page content in the sidebar.php. I found this page (http://get-simple.info/wiki/themes:template_tags) with the available tags, but I don't see the tag for which I can link to the page I created. Please let me know which tag should I use. Thanks.
There is no template tag for linking to a page. You can always insert a normal HTML hyperlink into the sidebar.
I commented the lines regarding footer.php in the default template, I didn't change the credits section in the footer.php, I just want to re-arrange it to place in another location (the sidebar). And like I mentioned, when I commented the lines linking to footer.php, it still show up in the template page.

As for the hyperlink in the sidebar content, is there really no way I can point to the original page? I have these pages in two different languages, and I think it would be nice if my visitors can see them both when I use the I18N component. If I setup the page to work in one language (and especially since I'm testing on local server) then I'd have to manually change them every time for different language and different files. Any suggestions?

Thank,
Angela
angelazou Wrote:I commented the lines regarding footer.php in the default template, I didn't change the credits section in the footer.php, I just want to re-arrange it to place in another location (the sidebar). And like I mentioned, when I commented the lines linking to footer.php, it still show up in the template page.

It depends on how you comment the lines. The safest way is probably
Code:
<?php /* ... */ ?>

angelazou Wrote:As for the hyperlink in the sidebar content, is there really no way I can point to the original page? I have these pages in two different languages, and I think it would be nice if my visitors can see them both when I use the I18N component. If I setup the page to work in one language (and especially since I'm testing on local server) then I'd have to manually change them every time for different language and different files. Any suggestions?

I don't fully understand what you want to achieve.
You can use find_url($slug, $parent_slug) to create links (where $parent_slug is not really necessary and can be null), e.g.
Code:
<a href="<?php echo find_url('my-page', 'my-parent'); ?>">My Link</a>
With I18N this will show the page in the current (best) language of the user.
Code:
<a href="<?php echo find_url('my-page', 'my-parent'); ?>?lang=de">My Link</a>
will link to the german page independent of the current user's language.
If you want to have different sidebars depending on the language, you can create components Sidebar, Sidebar_de, etc. If included with get_i18n_component('sidebar') the best language variant will be shown.
Thanks a lot, both issues are solved, just a little bit of reminiscence. You see, when I access these pages at the sidebar, they are assigned postfix of lang=zh, but when I try to read it in another language by adding 'setlang=en', it doesn't change it to English and the page URL become something like this

Code:
http://localhost/samplepage/?lang=zh&setlang=en

The most interesting thing happens when I click any of the menu pages. Since I'm currently in the Chinese version of my site, the page should return Chinese. However, what is returned is the English version.

Regards,
Angela
angelazou Wrote:Thanks a lot, both issues are solved, just a little bit of reminiscence. You see, when I access these pages at the sidebar, they are assigned postfix of lang=zh, but when I try to read it in another language by adding 'setlang=en', it doesn't change it to English and the page URL become something like this

Code:
http://localhost/samplepage/?lang=zh&setlang=en

lang=zh means: show the page in chinese
setlang=en means: set the preferred language of the user to english

But what do you mean: "they are assigned lang=zh"? Are these search results that you display in the sidebar?
Hi Mvlcek,

This is the type of URL that shows up when I select to display the sidebar page (linked to a website page not showing up elsewhere in the website) in Chinese, then select the English button trying to get back to the English version. But nothing happens, just having this really strange URL.

I'm not a programmer or a scripter, but can this be because of the two requests set on the page? Or, maybe I should just use the following instead?
Code:
<a href="<?php echo find_url('my-page', 'my-parent'); ?>?setlang=zh">My Link</a>

Thanks and Regards,
Angela
angelazou Wrote:This is the type of URL that shows up when I select to display the sidebar page (linked to a website page not showing up elsewhere in the website) in Chinese, then select the English button trying to get back to the English version. But nothing happens, just having this really strange URL.

Angela,

If you have a link like http://localhost/samplepage/, it means "show me the sample page in my preferred language, i.e.
  • if my prefered language setting (in the browser) is english, I will see it in english,
  • if my prefered language setting is french, english, chinese in this order, I will see it in english (if no french page exists)
  • if my prefered language is neither english nor chinese, I will see it in the default language (chinese in your case?)
If I click on a ...?setlang=zh link, it basically means "add chinese to the front of the list of my prefered languages". Thus I will see all pages in chinese.

If you have a link like http://localhost/samplepage/?lang=zh, it means "show me the page in chinese, independent of my language preference". Thus I will always see the page in chinese, even if an english page exists and english is my prefered language. Adding &setlang=en won't do anything, I will still see the page in chinese (but all pages without ?lang=zh in english).

If you want to show the page (always) in english, you must remove the ?lang=zh and add ?lang=en instead.
Well, the "&setlang=en" actually came from a script you gave me (the same one from your website to switch between English and German), if I changed the action from "&setlang=en" to "?lang=en", would the script still work fine?

Regards,
Angela
I changed the original scripts from 'setlang' to 'lang'. Now, it works fine between Chinese and English translation, but this annoying problems shows up. Depending on the times I switched between the languages, additional 'lang' are added, so the result of a switching URL become something like this:
Code:
http://localhost/samplepage/?lang=zh&lang=en&lang=zh&lang=en&lang=zh

And that's for switching the language 4 times, what if the client switches more times?

Regards,
Angela
angelazou Wrote:I changed the original scripts from 'setlang' to 'lang'. Now, it works fine between Chinese and English translation, but this annoying problems shows up. Depending on the times I switched between the languages, additional 'lang' are added, so the result of a switching URL become something like this:
Code:
http://localhost/samplepage/?lang=zh&lang=en&lang=zh&lang=en&lang=zh

And that's for switching the language 4 times, what if the client switches more times?

Regards,
Angela

In the latest version of the I18N plugin there is a new function to get a link to the current page in another language:
Code:
<a href="<?php echo htmlspecialchars(return_i18n_lang_url('en')); ?>" >English</a>
(there is also a similar function return_i18n_setlang_url)

See also http://mvlcek.bplaced.net/get-simple/i18n.