make bigger joomla modal pop up box in admin area - joomla

yes its a joomla question and im sorry to annoy but asking on the joomla forum takes forever or gets ignored.
Im really trying to find where i can modify the iframe modal box to be larger than the default.
When you go into article edit mode and choose to insert an intro image or full article image theres a select input field button. When select is clicked it opens a modal window that is quite small. I wanted to apply a full screen modal to it or at least make it 960x600px as opposed to 800x500px
But the thing is that the select button is generated by an xml file with fields in it.
The xml must be calling a function somewhere that generates the html for that button based on type=media inside the xml file but i cant seem to find where that function or code snippet is.
I just want the modal for selecting an image to be larger, it seems crazy not to make such a thing bigger instead of having horizontal and vertical scroll bars.
the file im referring to in joomla 2.5 for the xml fields:
line 540 and 572 ( Thats the two instances of intro image and full image )
administrator/components/com_content/models/forms/article.xml
That is the file where the image intro and full article image select fields are located.
then this file generates the output of them:
line 203 ( It does a foreach loop to grab the xml fields )
administrator/components/com_content/views/article/tmpl/edit.php
But i cant for the life of me figure out where this part in the html output on the article edit mode in the joomla admin is generated:
<div class="button2-left">
<div class="blank">
<a class="modal" title="Select" href="index.php?option=com_media&view=images&tmpl=component&asset=34&author=&fieldid=jform_images_image_intro&folder=news" rel="{handler: 'iframe', size: {x: 800, y: 500}}"> Select</a>
</div>
</div>
Thanks in advance
john

The file you are looking for is:
libraries/joomla/form/fields/media.php
line 121:
. ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">';

Since it appears that key details of the accepted answer to the original poster's question occurred via direct communication (based on comments in the first answer), for me it was necessary for me to search around for more information on where to change the sizing of modal windows—especially since it seems that the sizing of various popups are defined in different places.
So, in the hopes that this is helpful to others in similar circumstances, I'm leaving what information I was able to find out about which files have to do with modal behavior, appearance, and configuration.
Here's how the list is organized:
All the files in which I was able to find modal settings defined (or
items that seemed closely related to modal appearance and/or
behavior)
The line number on which relevant settings/configuration occurs (as
of 2.5.6)
Quotes of any nearby text that might provide insight to where/how
that particular modal is being used (when trying to determine if this
controls the modal you want to change), or a note of any information
that seems relevant/helpful
And here's the list itself:
\administrator\components\com_contact\elements\contact.php : 53
“COM_CONTENT_SELECT_A_CONTACT"
\administrator\components\com_contact\models\fields\modal\contacts.php : 69
“COM_CONTACT_CHANGE_CONTACT_BUTTON"
\administrator\components\com_content\elements\article.php : 55
“COM_CONTENT_SELECT_AN_ARTICLE"
\administrator\components\com_content\models\fields\modal\article.php : 78
“COM_CONTENT_CHANGE_ARTICLE"
\administrator\components\com_menus\models\fields\menutype.php : 71
\administrator\components\com_menus\views\item\tmpl\edit_modules.php : 46
“COM_MENUS_EDIT_MODULE_SETTINGS"
\administrator\components\com_menus\views\menus\tmpl\default.php : 113
“COM_MENUS_EDIT_MODULE_SETTINGS"
\administrator\components\com_modules\models\fields\moduleposition.php : 77
“COM_MODULES_CHANGE_POSITION_TITLE"
\administrator\components\com_newsfeeds\models\fields\modal\newsfeeds.php : 81
“COM_NEWSFEEDS_CHANGE_FEED_BUTTON"
\administrator\modules\mod_multilangstatus\tmpl\default.php : 14
“MOD_MULTILANGSTATUS"
\components\com_content\views\article\tmpl\default_links.php : 65
“class="content-links"”
\components\com_weblinks\views\category\tmpl\default_items.php : 110
\libraries\cms\form\field\user.php : 94
"JLIB_FORM_CHANGE_USER"
\libraries\joomla\html\toolbar\button\popup.php : 53 This
looks like it may be the php file setting up the base parameters &
such, which is invoked and built off of everywhere else.
\media\system\js\modal-uncompressed.js : entire file Contains
the interactive (client-side) logic for modal usage (note that Joomla
modal windows are SqueezeBox derived).
\media\system\js\modal.js : entire file
Same content as the file above, just minified.
\plugins\user\profile\fields\tos.php : 81 As far as I can see,
this seems to be used for displaying terms of service to end
users—probably if you created your own TOS that your users need to be
aware of and agree to.

Related

Browsershot : show two pages per sheet

I'm using the spatie/browsershot package with puppeteer to generate pdf in my applications. I have several templates for the generation, so I created a blade template for every template made.
I'm having a problem with one of the templates though, I'm trying to simulate two A5 pages printed on one A4 sheet (landscape mode). Doing this purely in css would be too difficult (calculate the end of the page, go on the other column at the right time, etc), so I generate it normally but with width and height set at the A5 dimensions. Of course, it appears right in the middle of the sheet, one page per sheet.
I wanted to know if there were a way to "glue" two pages together with Browsershot. Here's my call to generate the pdf:
$content = view('pdf.' . $survey->pdfTemplate->name, ['answer' => $answer)->render();
Browsershot::html($content)->noSandbox()->showBackground()->waitUntilNetworkIdle()->landscape($survey->pdfTemplate->is_landscape)->save(storage_path($id . '.pdf'));
I think that if there's a way to make such a thing, it must be here at the generation. Thanks a lot!
I see your question is still open.
I had the same problem because I had option ->format('A4') defined.
I removed the option, and all pages still generating in A4 format as long as you use ->savePdf();

CKEditor Adding Extra Classes To Widget

I've created a CKEditor widget to allow a user to input a section of text into a colored box once it is output to a report. My code is almost exactly like the simplebox example on the CK site
While I can get the widget to work and add the correct classes, 'simplebox-title' etc, it is also adding a ton of extra wrapper classes, data tags, and even an img (for the move button) when I save it into the database. So instead of having a clean:
<div class="simplebox-title"></div>
I end up with about 4 lines of code like:
<div data-cke-widget-id="0" data-cke-display-name="div" class="cke_widget_wrapper cke_widget_block" data-cke-filter="off".....etc>
All of this is going into the database. It even transfers the image of the "+" sign to move the div around. I don't want any of this as it comes through from the database into the report page.
I'm sure I'm missing something (probably obvious), but I can't find it. And blowing up the DB + having that move button won't work on a report.
I'm using PHP/Laravel, mysql, standard (not floating) CKEditor, CKEditor Save plugin.
Any help?

News Show Pro GK5 pagination

I am using the following module extension in Joomla 3.0 to display articles: https://www.gavick.com/news-show-pro
The module displays articles in columns and slides to the next article on automation or with pagination buttons.
Problem: It always slides by the nr of columns.
Example: If you specify 4 columns and paginate it slides away those 4 columns to the next 4.
Is there an option which allows me to just slide one column away and display a new one at the end.
Apologies for the initial comment. Looked too quickly at the word "Pro".
This isn't a default feature with this module, however some core jquery hacks can be made to the module, although I'm not a fan of some sort of approach and would suggest using a different module. Below os a little something to get you started.
Firstly ensure you are using the jQuery engine rather than MooTools. To to this, in the Module setting, go to the External Files tab and set the Used Javascript Framework to jQuery.
Go to line 275 of the following the following file:
modules\mod_news_pro_gk5\interface\scripts\engine.jquery.js
where you will find this code:
jQuery($this.module.find('.nspArtScroll2')).animate({
'margin-left': (-1 * this.arts_current * this.arts_block_width) + "%"
}, $this.config['animation_speed']);
and replace it with the following:
var contentWidth = jQuery('.nspArt').width();
jQuery($this.module.find('.nspArtScroll2')).animate({
'margin-left': "-" + contentWidth + "px"
}, $this.config['animation_speed']);
You will now notice that the slide moves 1 article at a time, however the previous ones disappear. This is because of the active class. Only articles within the parent element with the class active are set to be visible. From here on, have a mess around with the CSS to set the visibility styling.
Hope this helps
Unfortunately this will not be added to the extension. Here is the belonging github issue:
https://github.com/GavickPro/News-Show-Pro-GK5/issues/214

CKEditor changing content automatically

Found a very similar question here: CKEditor classes being stripped
I am using CKEditor 4.2, and I have found it automatically changes content/formats.
For example I have a plugin which automatically creates a new page and a link to it in the text editor, if I create a new page called 'newPage' it creates this code:
<p> </p>
<p><a class="wiki_page_link" href="newpage">newpage</a></p>
This is shown when I click the source button on the CKEditor, now if I click it again, it shows the button again but it's different, AND if I click the source button to view the source code again it displays this code:
<p> </p>
<p>newpage</p>
Now I don't know why CKEditor has automatically changed the link, but now the link won't work. And this is occurring a number of times, for example if I add a new link using the same plugin then the original 'newPage' link is automatically changed. If I have an image of set n x m width and height then load the CKEditor then the width and height are discarded and the image is set to it's default size. If a title is set to be in the center and the CKEditor is used to change the page this centering is defaulted to the normal left of the page.
Any advice would be appreciated,
Thank you
I have finally found a solution to this. The reason it took me so long is because links like this:
CKEditor classes being stripped
to the CKEditor website always say you turn CKEDITOR.config.allowedContent to 'true' and it only provides examples to trying to turn off individual plugins, but I needed to disable it over the entire system.
To disable Advanced Content Filtering throughout the entire CKEditor - in the config.js file insert the line:
config.allowedContent = true;
Hope this helps someone else.

Magento Remove back link from Create an Account Page

In create an account page, After all the text boxes, we can see submit button and back links. I wnat to disable the back link functionality in this page. I have seen the customer.xml, but nothing is related to this page. I think it is coming from the customer/account/link/back.phtml. But how to disable this functionality???
-- I found right path to remove Back line it can be either of below both path:
--app\design\frontend\base\default\template\persistent\customer\form\register.phtml
--app\design\frontend\yourtheme\yourtheme\template\persistent\customer\form\register.phtml
Between line no 175 to 180
Give php comments or delete that code
Thanks...
In normal scenario username,pwd or any data is stored in browsers cookies but magento provides this facility that when user name and passowrd or any cart item added in cart it stores in database table in persistent storage. So if same user adds any item to cart and login from another browser he can view his items from other browser as well. I also have not much research on it, but while surfing i got this much information .I will provide you one link wich can help you undestanding concept better... http://www.magentocommerce.com/blog/comments/persistent-shopping-cart-customer-segmentation-just-getting-better/
you can remove the functionality by copying /app/design/frontend/base/default/template/nostate/customer/form/register.phtml to your template and editing or deleting lines 174 & 337 <p class="back-link"><small>« </small><?php echo $this->__('Back') ?></p>
Following path is For removing Back Line that is :
\app\design\frontend\base\default\template\customer\form\register.phtml
Delete Line (Line No 177)
Copy register.phtml from \app\design\frontend\base\default\template\customer\form\register.phtml to \app\design\frontend\Your_Theme\default\template\customer\form\register.phtml
And at around line no 176 you will find code for Remove button just comment it

Resources