Jump to content
phrasespot

[Module] Multi Block Arbitrary Text Or Html

Recommended Posts

I will not be developing this module any further. Module codebase and rights has been transferred to another member of these forums, Marty Shue of Carolina Custom Designs, who I have no doubt will continue to maintain the quality the users of the module have come to expect. All further queries about the module should be made to Marty.

  • Like 7

Share this post


Link to post
Share on other sites

I was just looking for a module to display html in a block and I found this post, just installed the module on prestashop v1.4.4 and it works fine (I have only installed on left colunm so far)

 

Thank you Phrasespot

 

Steve

Share this post


Link to post
Share on other sites

Er i dont know if i did anything wrong but i cant get to the admin options of multiblock . It just loads the header of the module admin page and the rest of the page is blank??? Any ideas ???

Thanks!!!

Share this post


Link to post
Share on other sites

Tell me the version of your PS installation please. Also if you know how to, please check your server log and send me any error logged that may be related. Thanks.

Share this post


Link to post
Share on other sites

Works perfectly on 1.4.3 as far as i can tell.

Currently using it to have an xmas countdown banner at the top header of all pages.

 

Highly recommend this module...Great work!

Share this post


Link to post
Share on other sites

Er i dont know if i did anything wrong but i cant get to the admin options of multiblock . It just loads the header of the module admin page and the rest of the page is blank??? Any ideas ???

Thanks!!!

 

Use Smarty 2 instead of 3

chose no

Share this post


Link to post
Share on other sites

can't install it on v1.4.4.1 :(

 

 

error2.pngThe following module(s) were not installed successfully:

  • multiblockatoh

used smarty 2 then smarty 3

Share this post


Link to post
Share on other sites
used smarty 2 then smarty 3

The module should install whether you use Smarty 2 or 3, though it requires Smarty 3 for correct functioning. So the installation error is not due to Smarty version.

 

can't install it on v1.4.4.1

Please tell me any errors logged in Back Office > Tools > Log

Share this post


Link to post
Share on other sites

First delete the module. Then download [deleted] and try installing. Note any errors logged in Back Office > Tools > Log. Let me know.

Share this post


Link to post
Share on other sites

This is probably a directory permission error. Here is another copy that will give more info about where exactly it is failing. Delete the existing one, download [deleted] and note the error.

Share this post


Link to post
Share on other sites

Make sure you have a file called install.sql in module's sql directory. Make sure this file has read permissions for the user running as server process.

Share this post


Link to post
Share on other sites

same error, permission is 777 for test

 

Xcuse my bad english i'm a poor froggy french :)

Share this post


Link to post
Share on other sites
same error, permission is 777 for test
Hmm OK. lets take this to private messages not to clutter this thread. Shortly I will be sending you a link for a better instrumented copy that will help us to track the problem down.
Xcuse my bad english i'm a poor froggy french :)
No worries. It is better than my French, and I understand you fine. :)

Share this post


Link to post
Share on other sites

Hi, I'm having the same problem as critical_error. I'm using v1.4.4.1, can't configure the module - page is blank in admin.

 

Any progress on solving the problem?

  • Like 1

Share this post


Link to post
Share on other sites
page is blank in admin. Any progress on solving the problem?

I believe critical_error's problem is resolved and there is no known problems with the module currently.

 

Please make sure you are using the latest version available for download from the first post of this thread.

 

Check Back Office > Preferences > Use Smarty 2 instead of 3 is answered no.

 

If you use, try turning off all performance tweaks temporarily (Back Office > Preferences > Performance > Force compile= yes, Cache=No)

 

If you continue to have problems, locate the file /config/config.inc.php and at immediately beginning of the file, temporarily change the lines

 

@ini_set('display_errors', 'off');
define('_PS_DEBUG_SQL_', false);

to

 

@ini_set('display_errors', 'on');
define('_PS_DEBUG_SQL_', true);

 

visit the Back Office > Modules again, make a note of any error displayed and let me know. Remember to revert the changes you made when you are done.

Share this post


Link to post
Share on other sites

Hi Phrasespot,

 

I am having trouble installing this module on 1.4.3. No errors are shown, but the module is not in the modules list.

 

I have installed on another server running newest presta version without problems.

 

Do you have an older version better suited for prestashop 1.4.3??

 

best regards

 

Brian

Share this post


Link to post
Share on other sites
Thank You so much! Great module
Awesome module!
Great module!Thank you

 

Thanks, and you are welcome, glad it's of use.

 

I am having trouble installing this module on 1.4.3. No errors are shown, but the module is not in the modules list.

 

I have installed on another server running newest presta version without problems.

 

Do you have an older version better suited for prestashop 1.4.3??

 

The version available should work equally well with 1.4.3. I just tried it on a fresh install of v 1.4.3 and it installs and works fine. If you get module installed successfully, then the module should be in the modules list. If "you get there was an error installing" then there should be an error logged (Back Office > Tools > Log).

 

What is the PHP version?

 

Try turning of all performance tweaks temporarily, (Back Office > Preferences > Performance > Force Compile = yes, Cache=no, CCC=keep all as original) and uninstall and reinstall the module.

And at risk of stating the obvious, make sure you are looking under Front Office Features and the modules filter is set to display all modules.

 

If still having problems let me know I'll send you an instrumented version that will log a little more verbose.

Share this post


Link to post
Share on other sites

It's working now.....

 

"And at risk of stating the obvious, make sure you are looking under Front Office Features and the modules filter is set to display all modules"

:rolleyes: :rolleyes: :rolleyes:

Share this post


Link to post
Share on other sites

Just found this module. After reading this post, I found what I am looking badly for my site to put some custom block in left and right column.

 

Thank you very much Phrasespot. Keep it up.

Share this post


Link to post
Share on other sites

Just found this module. After reading this post, I found what I am looking badly for my site to put some custom block in left and right column.

 

Thank you very much Phrasespot. Keep it up.

Share this post


Link to post
Share on other sites

Great module just what i was looking for :)

 

I have a question, how can i change the text-html of a custom position that i just have created?

It disappeared from the "Add Module" combo and i cant find where to change it.

 

Thank you very much for the module and support !

Share this post


Link to post
Share on other sites
I have a question, how can i change the text-html of a custom position that i just have created?

Go to Back Office > Modules > Positions, filter the modules to display Multi block only. Make sure to check the "Display non-positionable hooks" as the module hooks some non-positionable hooks, scroll down and find the relevant hook, delete and recreate it again with new content (screen capture). A more detailed explanation is in module's configuration page help/usage section.

 

It disappeared from the "Add Module" combo and i cant find where to change it.
Yes that is by design.

 

Thank you very much for the module and support !

You're welcome

Share this post


Link to post
Share on other sites

Hello Phrasespot,

I'm new to prestashop and am trying to set it up. Ultimately I want some html above my store. So, I found this module and it looked like something that would do the trick, or at least get me closer to what I wanted.

I installed the module. At least it says it installed successfully. However, when I go to transplant the module in a hook it gives me an error

 

"This module cannot be transplanted to this hook."

 

I tried the left column and right column but it still didn't work. Any ideas? I'm using PS 1.4.5.1

 

Any help would be appreciated. Thanks

Share this post


Link to post
Share on other sites

Please read the help section of the module's configuration page. Transplanting hooks is not possible and is not necessary as the module hooks almost every available hook in prestashop. Just use the hook you want to add content rather than hooking some place then transplanting it to somewhere else. If you need the same content in two different hooks, hook them separately in two separate operations. So for example in your case,

 

1) Go to Back Office > Modules > Positions

2) Select Multi Block Arbitrary Text Or HTML in 'Show' dropdown

3) Check 'Display non-positionable hooks'. Then delete all Multiblock hooks you see in every section.

4) Go to Back Office > Modules > Front Office features > Multi Block Arbitrary Text Or HTML > Configure

5) Select 'Left column blocks' in Block Position drop down, enter content into Block body text field, save

6) Select 'Right column blocks' in Block Position drop down, enter content into Block body text field, save

 

Now you should have left and right columns displayed. Let me know if you have problems.

Share this post


Link to post
Share on other sites

This is perfect for what I need, I am a bit curious about one thing. I added a block with content to lets say home page content, Now if I want to change that content how do I go about editing already existing content, or do I have to delete it from positions and add a whole new one

Share this post


Link to post
Share on other sites
how do I go about editing already existing content, or do I have to delete it from positions and add a whole new one

Read through this thread please. Your question is answered here and here. Ask if not clear.

Share this post


Link to post
Share on other sites

I run 1.3.6. Is it possible to run Multi Block Arbitrary Text Or HTML module? thx

Share this post


Link to post
Share on other sites
I run 1.3.6. Is it possible to run Multi Block Arbitrary Text Or HTML module? thx
The module requires PS 1.4.0.4 or later. May be possible to customize for your version. Send me a PM this weekend and we will discuss it.

Share this post


Link to post
Share on other sites

Nice module, an idea of improvement. The ability that the code it`s executed only in category X , or to manually select the categories

Share this post


Link to post
Share on other sites

Hi there, seems like a great module, thanks for taking your time to make and share it.

 

I was wondering is it possible to have multiple instances of it on one hook?

Share this post


Link to post
Share on other sites
thanks...

you're welcome

 

thanks for taking your time to make and share it.

you're welcome

 

I was wondering is it possible to have multiple instances of it on one hook?

No, but depending what you want to do, it could be simulated. For example, you can use left-side hook to insert the relevant HTML for, say, four side blocks, or you could use the footer hook to build a complete custom footer. Tell me more what you're trying to achieve.

Share this post


Link to post
Share on other sites

Hi Phrasespot, that's kind of what I was thinking in the end. I just wanted three editable blocks on the homepage, as three divs floating next to each other in one horizontal line. Anyway, I've figured out what I want to do is probably feasible in the Editorial, but I'm going to mess with your module to make it in to a collapsible div to achieve another task.

 

The plan originally for your module was to have one of those divs to pull in a selected product as a "product of the week", to sit along side the featured products. I'm going to leave that idea for now though and I'll post back if I find a solution.

Share this post


Link to post
Share on other sites

Fantastc module. Thank you very much for this incredible easy-to-use content hooker. I it just the module anyone expects in the default of any hook-driven software install.

 

Thank you twice!!

Share this post


Link to post
Share on other sites

 

I have a question, how can i change the text-html of a custom position that i just have created?

 

I quote myself just in case someone have same needed than me of modifying directly the text of a previously created block (in my case for header).

 

The solution is modify it directly in the database, in the table "ps_mbatoh_block_lang" is stored the text, if you have various blocks created, you have to identify the id of the target block in the table "ps_mbatoh_block".

 

I hope phrasespot won't mind im sharing this 'hack' hehe.

 

Sorry for my poor english :P

 

Regards!

Share this post


Link to post
Share on other sites
The solution is modify it directly in the database

This is possible, but is not recommended as it comes with the problems inherent in manual DB manipulation.

 

Recommended method is to delete the relevant hook and re-create it with the new content.

 

If you don't have a local copy of the hook content on your computer (which you should), then copy it from the page source, modify as required than do the replacement.

 

If there is great demand to be able to edit hooks content in the back office, I may consider adding this functionality.

 

I hope phrasespot won't mind im sharing this 'hack' hehe.

He does not ;)

Share this post


Link to post
Share on other sites
EXACTLY what I was looking for! Thank you sooooo much for sharing!

Good to hear, and makes it worthwhile. You are most welcome.

Share this post


Link to post
Share on other sites

This seems like just what I need, but when I install it in 1.4.4.0 it is visible in the Modules under Front Office Features, but when I click to configure it, it takes me to page cannot be displayed.

 

Any suggestions?

Share this post


Link to post
Share on other sites
but when I click to configure it, it takes me to page cannot be displayed.

Are there any error messasge logged in BO > Tools > Log? Make sure you are using Smarty 3, not 2 (preferences > Use Smarty 2 instead of 3).

Share this post


Link to post
Share on other sites
Thank you for this module helped me to start. I rewrite it with the ability to modify existing blocks.You'll find my module here : ...

 

Please, you did not re-write it, you picked ideas and code from the original and released a dubiously licensed, watered-down 'light' version module that has no resemblance to the original so that you can advertise at its configuration page the more 'featured' version you are selling for 60+ Euro.

 

Either contribute your improvements back into the module so everyone can benefit from it, or go and advertise your product in your own thread.

 

In addition, since you cannibalized substantial portions from the original, I would like point your attention to the highlighted section from the module's license:

 

Copyright © 2011 phrasespot@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of

this software and associated documentation files (the "Software"), to deal in

the Software without restriction, including without limitation the rights to

use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies

of the Software, and to permit persons to whom the Software is furnished to do

so, subject to the following conditions:

 

The above copyright notice and this permission notice shall be included in all

copies or substantial portions of the Software.

 

By removing the copyright notices from the code you used, you are in vialotion of the module license and I, as the copyright holder revoke your licence effective immediately and ask you to remove all code copied from my module from both free and paid versions of your module.

  • Like 1

Share this post


Link to post
Share on other sites

The latest version of the module adds table of used blocks, ability to edit and delete existing blocks from the configuration page and several additional block locations. Beware of imitations sold at various loations on the web!

Share this post


Link to post
Share on other sites

pol4ku,

Do you have a response to phrasespot's claims? This is not only considered a violation of the rules of the PrestaShop forums, but is also illegal and in violation of his copyright. If we do not receive a response within 24 hours, we will be forced to ban you permanently from the PrestaShop forums.

 

-Mike

Share this post


Link to post
Share on other sites

Thank you for this module helped me to start. I rewrite it with the ability to modify existing blocks.

You'll find my module here : http://boutique.arti...g-anywhere.html

 

Enjoy

 

Our Addons team has removed this module from our site until we hear back from you. If you would like to respond to phrasespot's claim, please do so here.

 

-Mike

Share this post


Link to post
Share on other sites

I'm sorry I didn't see your reply before today. The paying version of the Free content blocks module is not a rewritted version of your module. It's a fully personnal writted software. I agree with you on the fact that my free version of the content block module is based on your Multi Block Arbitrary Text Or HTML. This module has been removed from my website, no problem. My goal was only to increase possibilities of your free Multi Block Arbitrary Text Or HTML module.

 

Best regards,

Bastien

Share this post


Link to post
Share on other sites

Thank you for the great module phrasespot.

 

Just wondering if it's possible to add a header/title to the block? If not, could you advise the file to change in the code.

 

Thanks again.

Share this post


Link to post
Share on other sites
Thank you for the great module phrasespot.

You're welcome

 

it's possible to add a header/title to the block?

Yes, that and much more. You can do almost anything in a block content (if anyone comes up with something that they cannot let me know).

 

Here is a snippet when used in a left colum block will create a Twitter feed (screen cap) with default style PrestaShop heading. Note the first two lines of the snippet.

 

<div class="block">
<h4>Twitter feed</h4>
<style type="text/css">div.twtr-hd > h4{background:none !important;border:none !important;}</style>
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
 new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 30000,
width: 190,
height: 300,
theme: {
  shell: {
 background: '#ffffff',
 color: '#000000'
  },
  tweets: {
 background: '#ffffff',
 color: '#030303',
 links: '#4aed05'
  }
},
features: {
  scrollbar: false,
  loop: false,
  live: true,
  behavior: 'all'
}
 }).render().setUser('twitter').start();
</script>
</div>

Share this post


Link to post
Share on other sites

Awww I should of thought of that. That's the beauty of a txt/html block!

 

Thanks again.......

Share this post


Link to post
Share on other sites

I'm sorry I didn't see your reply before today. The paying version of the Free content blocks module is not a rewritted version of your module. It's a fully personnal writted software. I agree with you on the fact that my free version of the content block module is based on your Multi Block Arbitrary Text Or HTML. This module has been removed from my website, no problem. My goal was only to increase possibilities of your free Multi Block Arbitrary Text Or HTML module.

 

I am not convinced.

 

You claim your goal was to increase the possibilities of Multi Block. Not only you did not add anything new to the module (with either free or paid versions), but you removed all licensing text, references and credits. No mention of the original at all while you were charging an installation fee for it with advertising and links to the paid version in its configuration page (for the sake of clarity, you can do anything with my modules, including selling it to others. Just not pretending it is your own work).

 

Here is the original Multi Block description:

This module allows you to insert arbitrary text, HTML or Javascript content into almost 30 places at the front and back office

 

Here is the description of the module you were selling in PrestaShop add-ons site:

This module allows you to insert arbitrary text, HTML or Javascript content into almost 30 places at the front and back office

 

Here is an example of smarty variable naming in the original:

{$assignedVars.links.positionsTab}

This one is from yours:

{$assignedVars.links.positionsTab}

Here is a method from the original:

private function _psizeSql($haystack) {
$search = array('PREFIX_', 'ENGINE_TYPE');
$replace = array(_DB_PREFIX_, _MYSQL_ENGINE_);
return str_replace($search, $replace, $haystack);
}

This is in yours:

private function _psizeSql($haystack) {
$search = array('PREFIX_', 'ENGINE_TYPE');
$replace = array(_DB_PREFIX_, _MYSQL_ENGINE_);
return str_replace($search, $replace, $haystack);
}

Here is another method from original:

private function _hookOracle($hook) {
global $smarty, $cookie;
$id_lang = $cookie->id_lang ? (int) $cookie->id_lang : (int) Configuration::get('PS_LANG_DEFAULT');
$smarty->assign('block', $this->_getBlockFor($hook, $id_lang));
return self::display(__FILE__, 'tpl/block.tpl');
}

This one from your:

private function _hookOracle($hook) {
global $smarty, $cookie;
$id_lang = $cookie->id_lang ? (int) $cookie->id_lang : (int) Configuration::get('PS_LANG_DEFAULT');
$smarty->assign('hook', $hook);
$smarty->assign('block', $this->_getBlockFor($hook, $id_lang));
return self::display(__FILE__, 'tpl/block.tpl');
}

The list goes on, right down to the naming of module directories/files and screen captures. In fact, you don't have a single original idea. So excuse me if I have doubts about the integrity of your claim of authorship. I will however be bound by third party arbitration if you do too. Submit your module (in the form it was when you released it, without any further modification) to a trusted community member who can read code and is willing to be the arbitrator and I will accept his/her findings.

 

A much simpler option would be to just conform to its license and do whatever you want with it (including selling it on add-ons site).

Share this post


Link to post
Share on other sites

 

I am not convinced.

 

You claim your goal was to increase the possibilities of Multi Block. Not only you did not add anything new to the module (with either free or paid versions), but you removed all licensing text, references and credits. No mention of the original at all while you were charging an installation fee for it with advertising and links to the paid version in its configuration page (for the sake of clarity, you can do anything with my modules, including selling it to others. Just not pretending it is your own work).

 

Here is the original Multi Block description:

 

 

Here is the description of the module you were selling in PrestaShop add-ons site:

 

 

Here is an example of smarty variable naming in the original:

{$assignedVars.links.positionsTab}

This one is from yours:

{$assignedVars.links.positionsTab}

Here is a method from the original:

private function _psizeSql($haystack) {
$search = array('PREFIX_', 'ENGINE_TYPE');
$replace = array(_DB_PREFIX_, _MYSQL_ENGINE_);
return str_replace($search, $replace, $haystack);
}

This is in yours:

private function _psizeSql($haystack) {
$search = array('PREFIX_', 'ENGINE_TYPE');
$replace = array(_DB_PREFIX_, _MYSQL_ENGINE_);
return str_replace($search, $replace, $haystack);
}

Here is another method from original:

private function _hookOracle($hook) {
global $smarty, $cookie;
$id_lang = $cookie->id_lang ? (int) $cookie->id_lang : (int) Configuration::get('PS_LANG_DEFAULT');
$smarty->assign('block', $this->_getBlockFor($hook, $id_lang));
return self::display(__FILE__, 'tpl/block.tpl');
}

This one from your:

private function _hookOracle($hook) {
global $smarty, $cookie;
$id_lang = $cookie->id_lang ? (int) $cookie->id_lang : (int) Configuration::get('PS_LANG_DEFAULT');
$smarty->assign('hook', $hook);
$smarty->assign('block', $this->_getBlockFor($hook, $id_lang));
return self::display(__FILE__, 'tpl/block.tpl');
}

The list goes on, right down to the naming of module directories/files and screen captures. In fact, you don't have a single original idea. So excuse me if I have doubts about the integrity of your claim of authorship. I will however be bound by third party arbitration if you do too. Submit your module (in the form it was when you released it, without any further modification) to a trusted community member who can read code and is willing to be the arbitrator and I will accept his/her findings.

 

A much simpler option would be to just conform to its license and do whatever you want with it (including selling it on add-ons site).

 

As I say before, the free version of my module as nothing to see with the paying one. The free version is, I AGREE WITH YOU, AN UPGRADED COPY OF YOUR MODULE (I add functionnalities to your module because when I downloaded it, it was maybe in September, they were not included). The paying version is not a release of the free one with only some functionnality added. It's a fully rewritted module, with a totaly different conception and way of considering blocks. And to explain why the description is the same it's because the goal is the same and my maternal language is french so it was only for comodity reasons, I don't think your description is the best at all on the web and I can change it if it's a problem for you. There's a lot of others "Add blocks" modules in the Prestastore and I'm quite sure they use the same kind of description. I'm ok to let a third party be judge if you still don't believe me, no problem.

Share this post


Link to post
Share on other sites

pol4ku and phrasespot,

To me, it sounds like the majority of this dispute could be resolved by just conforming to phrasespot's licensing requirements, and ideally, you two would settle this over PM and only come to me once you've reached a resolution (or not). But if you are not willing to do so, please email copies of all modules in question to mike DOT kranzler AT prestashop DOT com, and we will make a comparison and come to a final decision.

 

-Mike

Share this post


Link to post
Share on other sites

Hi,

 

I don't still your module but i do still your description ... LOL

 

I can tell anymore but just respect the rules and author but you are neither the first nor the last to do that.

 

like all developpers create an other social module because one people do that.

Share this post


Link to post
Share on other sites

My module is available for download from the link given in the first post of this thread. But yeah, I agree that the thread has wandered far enough from its purpose. I am going to just let go as I also agree with jeckyl that this is a problem without a solution. pol4ku can resubmit 'his/her' module to add-ons. I will however make an exception in this case and also submit multi block to the add-ons site as a free add-on (this is something I never do, not to interfere with the similar, commercial modules there). Finally, it is the before/after service that comes with the module what makes a module usable, and in imitations that is exactly what is lacking, not least due to a lack of understanding of what it being imitated but also due to the nature of the imitator.

Share this post


Link to post
Share on other sites

Nice module but images can't be uploaded directly from BO usin TinyMce as editor. Could be nice to have tinyMce.

 

In fact pol4ku module was using TinyMce as editor and your not, so it was not exactly a copy of your module but a fork.

Share this post


Link to post
Share on other sites

Tiny is not there on purpose. You can insert anything in a plain text editor, inluding HTML but when you try tiny with content snippets (widgets) of third parties e.g. FB, you 'll run into problems. That was considered a major use of the module , hence plain text field only

Share this post


Link to post
Share on other sites

hello, have already installed the module, you can not do an update to the module for a text to roll by, this place of my site?

post-79827-0-51777200-1326473244_thumb.jpg

Share this post


Link to post
Share on other sites

Love the upgraded module, on one of my sites the section in the module 1.3.2 allows me to edit different sections which is fantastic, but on another installation of the same module 1.3.2 module this option does not show (editable sections). I have unistalled, deleted the old module and placed the new version of my site but once i update the module it does not show the edit options for each HTML part i created. it says the module cannot be updated. It shows that it is version 1.3.2 but the extra options are not showing that allow me to edit parts.

 

Can you help?

 

Prestashop version 1.4.3

Share this post


Link to post
Share on other sites
Prestashop version 1.4.3

Delete all files in /tools/smarty_v2/compile/ directory except index.php

Share this post


Link to post
Share on other sites

This is exactly what I was looking for a few weeks ago, but just when I stopped searching... I found it while looking for something else! :D

 

Congrats and thanks for sharing!

Share this post


Link to post
Share on other sites

Current version: 1.3.4 (adds Russian and Ukrainian translations)

Updated: 20120117

 

The Multi Block Arbitrary Text Or HTML, AKA Hook Master, AKA Insert Anywhere.

 

This module allows you to insert arbitrary text or HTML content blocks in over 30 locations at front and back office.

 

Beware of expensive imitations!

 

Download link and screen captures

 

Dutch translation by @nostradamus

Russian and Ukrainian translations by @ehtacl

 

----

Some usage notes:

 

I have been getting a few questions on how to use this module with the code snippets obtained from third party sites, like Facebook, to include their 'widgets'. So here is a small walk through not to repeat myself. This gives Facebook as an example but the idea is the same for any code snippet you obtain from any other site.

 

1- Make sure you trust the site from which you include the code. Adding code from another site is equal to giving that site's owner, admin, hacker FTP access to your server. If the site is malicious, or compromised, the game is over.

2- Make sure this module is compatible with you installation, download and install it.

3- Visit the Facebook page and select the widget you want to include in your site, in this example I am using Like Button, others are available. The Facebook page offers few customization options and documentation. Read the documentation and customize the widget to your liking.

4- Get the code (example screen capture). In this instance I am getting HTML5 code, other options are available. Suit your needs.

5- Go to Back Office > Modules > Front Office Features > Multi Block Arbitrary Text Or HTML > Configuration

6 - Select the location in which you want third party widget to appear from Block Position drop-down. In this instance I am adding the widget below the 'Buy Block'. Paste the code you obtained from Facebook in Block body text field, save (example screen capture).

7- The widget will appear in its location (example screen capture)

8- Make sure you trust the site from which you include the code. Adding code from another site is equal to giving that site's owner, admin, hacker FTP access to your server. If the site is malicious, or compromised, the game is over.

 

Notes:

- More detailed help and examples are available in Module's configuration page.

- Yes, I know description of locations in Block position drop-down may be ambiguous. These are the location descriptions given by Prestashop developers. Complain to them, or better, look at the screenshots linked from above to see every location the module is able to add content and the corresponding entry of the drop-down field.

- Facebook page instructed to paste first part of the code after the opening body tag and the second part where you want plugin to appear. I pasted all into the same place. This usually does not matter, though you could, if you want, by using two different blocks (e.g. position Header for JavaScript part and another position for HTML part) . If you come across a particularly troublesome snippet, ask.

- Sometimes you may need to tweak the code snippet you get by, for example, wrapping it in a <div> element, adding some CSS styling etc. to place it exactly like you want. Experiment, and if having problems, ask.

- Finally, make sure you trust the site from which you include the code. Adding code from another site is equal to giving that site's owner, admin, hacker FTP access to your server. If the site is malicious, or compromised, the game is over.

Hi phrasespot.

 

Anyway I can get a link to this module?. I am in china and here we can not acces sites like blogs-"sites" after or before an ordinary link.

Share this post


Link to post
Share on other sites
thanks for sharing!

You're welcome

I am in china and here we can not acces sites like blogs-"sites" after or before an ordinary link.

If you PM me an email address I will email it to you, or alternatively give me a download site you can access and I will upload it there.

Share this post


Link to post
Share on other sites

Hi phrasepot!

 

Downloaded and impressed!

 

Quick Q:

 

Is it possible to hook into a custom hook that I created elsewhere (using this method)?

 

When I added my hookname to the "private static $_HOOKABLES = array", it showed up in the dropdown, but ultimately didn't work.

 

Thanks a million! :)

Share this post


Link to post
Share on other sites
Is it possible to hook into a custom hook?

 

It is, as well as adding it to hookables array, modify the PREFIX_mbatoh_block table and add the hook name to enum values already specified there.

 

Thanks a million

:) you're welcome

  • Like 1

Share this post


Link to post
Share on other sites

It is, as well as adding it to hookables array, modify the PREFIX_mbatoh_block table and add the hook name to enum values already specified there.

 

Thanks, that worked like a charm :)

Share this post


Link to post
Share on other sites

This module is the most important form me ..I can make everything thank you very much

Share this post


Link to post
Share on other sites

First of all, many thanks to phrasespot for updating the module making the created blocks editables, amazing work :)

 

Second, I have a 'wished feature idea' for the module :P

Since i dont know the complex of the work, sorry if im asking something too dificult due prestashop design.

It will be possible to add differents-independients html blocks to the same hook?

 

Rgrds.

post-262656-0-52594200-1328628712_thumb.png

Share this post


Link to post
Share on other sites

You can already simulate something similar to the image you posted. You are hooking only left column but adding two blocks' content consecutively (I realise that is not what you mean). Add the following code in left column body field:

 

<div class="block">
 <h4>Left column mbatoh</h4>
 <div class="block_content">Lorem ipsum dolor sit amet...</div>
</div>
<div class="block">
 <h4>Left column mbatoh 2</h4>
 <div class="block_content">Lorem ipsum dolor sit amet...</div>
</div>

 

This is what the end result will look like. One module/hook once/hook is a PS limitation, otherwise that feature would have been implemented already.

Share this post


Link to post
Share on other sites
You can already simulate something similar to the image you posted. You are hooking only left column but adding two blocks' content consecutively (I realise that is not what you mean). Add the following code in left column body field:
 <div class="block"> <h4>Left column mbatoh</h4> <div class="block_content">Lorem ipsum dolor sit amet...</div> </div> <div class="block"> <h4>Left column mbatoh 2</h4> <div class="block_content">Lorem ipsum dolor sit amet...</div> </div> 

This is what the end result will look like. One module/hook once/hook is a PS limitation, otherwise that feature would have been implemented already.

 

Wow! That did the trick! Thank you very much for the advice.

Share this post


Link to post
Share on other sites

Thanks for sharing excellent module.

 

Please help me how can I implement it for multiple languages like website I am developing is in English and Spanish but this module is just for English language.

 

How can add custom hook area?

 

Do you have any solution about this issue?

 

Waiting for your kind reply.

Share this post


Link to post
Share on other sites
how can I implement it for multiple languages like website I am developing is in English and Spanish but this module is just for English language.

All (most) UI text is translatable. Back Office > Tools > Translation > Modify translations Modules > Multi Block ... > Spanish Flag. Enter translations and save. Send me a copy of translation file created in the module directory please (es.php) if you do, so others can benefit.

 

How can add custom hook area?
See the earlier post by Kram for an example how to add the custom hooks to the module, and my reply to it.

 

You do not need to duplicate your posts. It will be answered when you post to this thread (eventually). Remember all support is free and voluntary so it may not be as soon as you post a question.

Share this post


Link to post
Share on other sites

All (most) UI text is translatable. Back Office > Tools > Translation > Modify translations Modules > Multi Block ... > Spanish Flag. Enter translations and save. Send me a copy of translation file created in the module directory please (es.php) if you do, so others can benefit.

 

Thanks for quick response.

I have did the same steps as your above but I unable to found my created custom blocks text fields in module translation area.

 

Screenshot is here

post-308036-0-66988600-1329234419_thumb.png

Share this post


Link to post
Share on other sites

I am currently running SVN 1.1.7 on my 1.4.5.1. Can I simply download the latest 1.3.6 version and replace the directory and the current hooks would not be unhooked? What's the correct process of updating your module?

Share this post


Link to post
Share on other sites

There has been quite a few changes beween 1.1.7 and 1.3.6 so I would recommend first uninstalling and then deleting the old version before installing the latest version. This unfortunately means that you will need to recreate your hooks/contents. Therefore it may be worthwhile if you replace the module directory contents and see if it works. If not you can always do it the other way. Let me know if you have problems.

Share this post


Link to post
Share on other sites

Hi prhasespot!

 

As you know, im a big fan of your module, it makes my life much easier, once again thanks for sharing.

I have a simple request for the backend this time.

 

Since i have developed a site in multiples languages, when writing the text of a block in your module, it becomes some confusing because it keeps the textarea of the original languaje show instead of hiding it (like the rest of the prestashop backend does). It will be a good improvement i think for next release, please consider it.

Attached picture because i think my explanation wasn't very clear. (I'm spanish :P)

post-262656-0-33455000-1331235816_thumb.png

Share this post


Link to post
Share on other sites

Hi,

please,i have a problem with your module. I made changes like a post #22.

And now there is new problem. BO, modules :

 

Warning: require_once() [function.require-once]: Unable to access /data/www/netkrmiva.cz/www.netkrmiva.cz/modules//multiblockatoh/MultiBlockAtohBlock.php in /data/www/netkrmiva.cz/www.netkrmiva.cz/modules/multiblockatoh/multiblockatoh.php on line 28

 

Warning: require_once(/data/www/netkrmiva.cz/www.netkrmiva.cz/modules//multiblockatoh/MultiBlockAtohBlock.php) [function.require-once]: failed to open stream: No such file or directory in /data/www/netkrmiva.cz/www.netkrmiva.cz/modules/multiblockatoh/multiblockatoh.php on line 28

 

Fatal error: require_once() [function.require]: Failed opening required '/data/www/netkrmiva.cz/www.netkrmiva.cz/modules//multiblockatoh/MultiBlockAtohBlock.php' (include_path='.:/usr/local/php5/lib/php') in /data/www/netkrmiva.cz/www.netkrmiva.cz/modules/multiblockatoh/multiblockatoh.php on line 28

 

Thanks

Share this post


Link to post
Share on other sites