I need to add HEADER data with the TCPDF(in codeigniter).
like:
HEADING_TEXT_LEFT HEADING_TEXT_RIGHT
______________________________________________________________________________
This type of heading for Left and right I need to add, with two different Text. Also I cannot change the header() function as I am using PDF in several places. So I don't need common place, solution is for this. Is there any way to make this.
I am using this :
$this->pdf->SetHeaderData("", "", "", $left_header_text);
but this will give only one variable and that is also left side.
Have a look at Arturo answer here, this should work fine for you.
Related
I am using blocks to create and share my d3 snippets. When I have more than one file, for example this block, the data.tsv the file appears second. It's a huge file, so if someone wants to see the javascript code he has to scroll all the way down.
My question is, is there any way to change the order in which files are displayed in blocks? It seems to not follow Github gist's alphabetical order as index.html appears before data.tsv. Or do I have to create just one index.html file and put all my javascript and CSS code in it? like most of the blocks do.
index.html is always listed first, then the other files are listed alphabetically. Something I'll prepend an _ to interesting files, like _script.js to force them to show up first.
I've got a very long table that I need to use with a module. But when I paste the table into the custom HTML module, it limits the amount of characters and cuts the code short. I'm not using any editor.
Tried going to the DB, looked for _modules. Followed another suggestion to change Content type from "text" to "mediumtext", but it does not allow me to change it? From the content column, I can only change function or value, but not type. Any ideas?
Attached screenshot.
Try with one of these extensions : http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-modules
So I was thinking of putting a decorative element between links such as // for example.
So it would be LINK1 // LINK2 // LINK3 // LINK4 // LINK5 but ONLY between the links for decoration purposes such as
EXAMPLE of coding
Is there a way to do the same with a html list or in a more cleaner or technically correct format? Or would this be the way to code something like that since I keep reading that lists are a better way of formatting a links menu. Thanks for all the help!
The easiest method is how you do it (that's the way I do it also :)But yes, using an HTML list is the more technically correct method. Especially for non-CSS devices, the links will be a decent-looking bullet list, rather than a long string of links (which may not look good without CSS).
I am doing Multi-language store in magento. i have some custom menu in header section like how to order, Help etc. .
now currently these menu i have given direct link like
<li>Help</li>
<li>how to order</li>
i am not sure how multi-language feature will work with this menu.. How can i write these top menu as if It will change with language change.
any suggestions will be helpful for me.
thanks
Any text that is hard-coded into your template needs to be wrapped in the translation helper.
echo $this->__('Help');
But make sure the block it applies to has a helper declared, otherwise you'll need to load the generic helper.
Mage::helper('core')->__('Help')
Then, you can edit the relevant translation CSV file. By putting "Help" in the first column, and the translation in the second column.
Although, you'll be able to use translate in-line once you are using the above PHP.
I'd like to add a new tab to the 'catalog->manage products->product information' page in the admin. Underneath the 'images' tab, I'd like to add a new tab for video, with a simple text input for adding a video url, which I can then grab for the frontend.
Anyone any ideas where the files are that I need to edit? I've been looking for the last couple hours with no joy. I found the list of current options in Mage_Catalog_Model_Resource_Eav_Mysql4_Setup but can't figure out how to add to them...
Seems it gets some from Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs. If I copy one of the tab sections here and change the title to Video, I can get it to display in the tabs on the left. But how do I then add the options for it?
What you are trying to do, from the sounds of it, is to create a custom field and add it to your catalog data. The good news is that you don't need to muck around in the PHP for that.
Head to Catalog -> Attributes -> Manage Attributes and create a new attribute for yourself called "Video URL" (or something to that effect). This will probably be a text field, and you may want to hide it from comparison on the frontend of the site (select "No" for all those boxes at the bottom of the form).
Once you've created an attribute, you will need to add it to an attribute set. If all your products are of one "type", and if you didn't create any other attribute sets, this should be only one step. Head to Catalog -> Attributes -> Manage Attribute Sets and create a "New Group" called "Video" and drag your new video url attribute into it. Save the attribute set and you should now have your new tab.
The only complication from what I read in your post could be positioning it underneath the images tab. Magento adds several tabs statically (the long way, in the PHP) and doesn't generally obey ordering of the tab groups. Consider the time tradeoff.
Hope that helps. Thanks,
Joe
Per your other comments, for the URLs a simple attribute would work but files would tend to be more difficult. To add a custom tab, as you said, you can edit (or in the case of a plugin, override) Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs::_prepareLayout and add your tab. You'll need to add a block or template to display your tab contents.
After that, you'll need to store the data somewhere. Looking in Adminhtml/controllers/ProductController, you should be able to hook into the catalog_product_prepare_save event to get data from $event->getRequest() and push it onto the product or save another entity as necessary.
I'm not sure how well file saving semantics would work on a product, so you may want to do your own data storage in the extension and then provide something like a getVideoForProduct method to retrieve it.
Then the only thing left to do is modify the catalog/product/view.phtml template file to include your thumbs and create a controller in your extension to provide a modal w/ the video (or do it in JS).
I know that's a bit of a general answer, but it's the rough path you would need to take for tabs. Let me know if any specific part of that is unclear.
Thanks,
Joe