so I have 2 modules one working(paid for not encrypted)learned a lot from it lets call this the reference_module and I have my own module which was a PHP page which I am rebuilding for WHMCS and it is almost working completly lets call it created_module.
the problem right now I have is the reference_module is called by when going to https://domainwhmcs.nl/clientarea.php?action=productdetails&id=0001&reference
which is working and shows what I want:
the normal header
normal sidebar
normal footer
and its own content in the main content area
it does this by using hooks having ReferenceClientareaheaderoutput and ReferenceClientareapage which works.
so now I tried to recreate this in created_module but when going to https://domainwhmcs.nl/clientarea.php?action=productdetails&id=0001&created which is working but shows me:
its own content
just its own content but I want the same as in Reference.
I think if I am going to paste the code the post will be to long if needed maybe I can post specific parts.
Allread thanks for helping
so I actualy did solve it today you have to use javascript
jQuery.post("index.php",{"action":'dbinfo',"user":username,"serviceid":serviceid},
function(data){
jQuery(".main-content").html(data);
jQuery("#tabs li").removeClass("active");
jQuery("#tabs li").eq(index).addClass("active");
and
if (isset($_POST['action']) && $_POST['action'] == "dbinfo") {
this you do in your module hook if you need help you can contact me
Related
I am currently editting a wordpress theme and creating a navigation bar half way the page that sticks to the top of the screen once the user scrolls past a certain point. Ive done this before and it worked fine. I copied that exact code and changed the #divs and classes to the correct ones. This is the code i use:
$(window).scroll(function () {
console.log($(window).scrollTop())
if ($(window).scrollTop() > 10) {
$("#stickbar-steps").addClass("after-scroll-wrap");
}
if ($(window).scrollTop() < 9) {
$("#stickbar-steps").removeClass("after-scroll-wrap");
}
});
However it doesn't seem to add the class to the #div.When i manually add the class to the #div it works fine but it just wont load the script or wont attach the class. Usually when i reach that point in my previous working one, i could see it getting attached using inspect element, but im not seeing it in this one.
The wordpress theme has a seperate page in the admin section which allows me to paste in JS code. I've tried to add it there and i've tried to paste a copy among the other jquery files in the functions.php. But neither of them seems to work.
Any ideas where to look for? Theme uses jquery ver=1.12.4.
Thanks
I need to access the footer inside a wordpress theme via a url. Ideally it would just render the footer data and nothing else, alternative suggestions welcomed though.
To add some context, the data will be fetched through the url and a script will read the markup. This data will then be cached and available through Magento where it is needed to be displayed..
Is there a url path that will display it or should I make a new page that can be called via the base-url+the-page-name???
There's nothing built in to do that. You could use the AJAX API in your theme or a plugin and accomplish it.
You hook into an action that gets sent as a URL or POST data parameter and then make a request to yoursite.com/path/to/wordpress/wp-admin/admin-ajax.php.
<?php
add_action('wp_ajax_so20495429_display_footer', 'so20495429_display_footer');
add_action('wp_ajax_nopriv_so20495429_display_footer', 'so20495429_display_footer');
function so20495429_display_footer()
{
get_footer('ajax');
}
This will work for all users, logged in or not, despite the wp-admin URL. Here is code above wrapped up in a plugin.
what you can do is make a wordpress custom page template.
If you dont know how heres a little tutorial : http://www.expand2web.com/blog/custom-page-template-wordpress/
Now you want the custom page template to only load the footer (add the html, head and body opening tags yourself)
if you create a new page with your page template seletced it will only output the footer.
Hope you can get it to work
Greetings
merijn
What about $footer_url=get_template_directory_uri().'/footer.php'; ?
I have a task, I did research but I still cannot be done.
I am using OpenCart. And I have to add code tracking (from tradetracker and daisycon) to thank you page.
How can I do it?
If you aren't too comfortable with writing your own extension and your tracking code is JavaScript or HTML you can place it straight into your template. You will find the template you need in:
/catalog/view/theme/default/template/common/success.php
The only problem is that this will now fire every time the page loads. Any success goes to this template.
To fix this you need to go into the controller and make a small addition.
Find:
if (isset($this->session->data['order_id'])) {
Add a new line below reading:
$this->data['enable_tracking'] = TRUE;
Then back in the template before simply add an if statement round the tracking code you have added like so:
<?php if($enable_tracking === TRUE){ ?>
Delete this line and replace with tracking code
<?php } ?>
That should solve your problem.
I'm going crazy with this one. I am trying to change a little bit the pagination style and layout in Joomla. So, I found this file: libraries\joomla\html\pagination.php but I know that pagination is overridden by this file: templates\gk_yourshop\html\pagination.php. Yet, if I modify something in gk_yourshop\html\pagination.php, I can't see the change in the pages. Does joomla cache templates and I have to re-load them (like phpBB)?. I don't understand.
I tried to check if writePagesLinks is called from joomla\html\pagination.php with this:
function getPagesLinks()
{
echo "test";
global $mainframe;
and I can't see the message. I also did this in the other pagination.php file and it's just like I can delete them and it doesn't matter. Can you help me? Thanks!
Looks like I changed it here some time ago:
\libraries\joomla\html\pagination.php
But, that is system file, so i just make a "hotfix" of it.
In Joomla 3.x you can create pagination override from Extensions > Templates > Default Template > Create Overrides > Layouts > Pagination.
The override files are created in "Default Template" "html\layouts\joomla\pagination" folder.
You can edit the override files as per your needs.
Where are you getting WritePageLinks from? That's not one of the supported methods.
http://docs.joomla.org/Understanding_Output_Overrides#Pagination_Links_Overrides
There are four functions that can be used:
pagination_list_footer
This function is responsible for showing the select list for the
number of items to display per page.
pagination_list_render
This function is responsible for showing the list of page number links
as well at the Start, End, Previous and Next links.
pagination_item_active
This function displays the links to other page numbers other than the
"current" page.
pagination_item_inactive
This function displays the current page number, usually not
hyperlinked.
[edit]
You may also want to look at Protostar as an example.
I want to theme the page /cart/checkout/complete
I already saw the settings in admin/store/settings/checkout/settings, but they are not enough.
I want to add some HTML i.e. add a print button at the top of the page.
I would like to have a .tpl.php file to use as template, or otherwise, using an alternate checkout page, how to insert the texts defined in checkout settings.
I tried to make a uc_cart_complete_sale.tpl.php but it isn't called.
Thank you in advance.
According to the Template Suggestion documentation you can provide a custom page.tpl.php for absolutely any path, so a template file with the following name would override page.tpl.php for the path cart/checkout/complete:
page--cart--checkout--complete.tpl.php
Be sure to clear Drupal's cache once you've create the file so the changes are picked up in the theme registry.
After hard work, i found the template page.
It is:
page--cart--checkout--complete.tpl.php
remember to clear the cache
firstly, you should probably check this page: admin/store/settings/checkout/edit/messages
there you can customize a header for the message displayed when the checkout completes.
other than that, you can implement some functions to alter this page. from a short look in the ubercart api maybe this function will do: my_module_checkout_complete() in this link the guy says it worked
another function that should work is theme_uc_cart_complete_sale
there are other options, such as in your template.php check if this is /checkout/complete and do whatever you want. like this:
if (arg(0) == 'cart' && arg(1) == 'checkout' && arg(2) == 'complete')
and than redirect to your page. anyway, there are plenty of ways to accomplish this, but just naming a file 'uc_cart_complete_sale.tpl.php' won't work. sorry...
In D6 at least, you can theme the message by overriding theme_uc_cart_complete_sale() - so if that's what you're after, theme the message by overriding that in your theme (for example, function mytheme_uc_cart_complete_sale($message, $order) {}