Collaboration between files using jumi in joomla 2.5 - joomla2.5

I am a beginner php and joomla user. I have installed jumi component in joomla 2.5. I want to collaborate between pages but I don't know how to link between them. Can anyone please help me by explaining briefly.
Such as I have created a new file in jumi named "linked to another article" and the codes are explained below:
I have defined them:
defined("_JEXEC") OR die ("Restricted access");
I have created a link:
$linktext = "<Click> & you'll see";
After that I put the href:
<a href="FILE PATH"><?php echo htmlspecialchars($linktext);?>
After that I have created another file in jumi named "ABC" where I put <?php echo"Hello World"?>, how can I include the path of ABC file in the "FILE PATH" of my first file so that if I click on the first files link then it will redirect me to my ABC file and show "Hello World"?
I will be grateful for your kind reply.
Thanks.

Let's suppose you have 2 files in the jumi directory (components/com_jumi/files). A.php and B.php.
We don't want people to be able to access those files directly, so we place inside them the snippet
defined("_JEXEC") OR die ("Restricted access");
So far so good. Assuming that your website's URL is h**p://www.example.com, you'll get a
restricted access if you try any of the bellow:
h**p://www.example.com/components/com_jumi/files/A.php or
h**p://www.example.com/components/com_jumi/files/B.php.
This means that you cannot use those URLs to access for example B.php from A.php.
So here is a workaround:
Create 2 jumi applications from your administration panel, one for A.php (let's call it Application_A) and one for B.php (let's call it Application_B). I supose you have already done that.
Create a menu item of type Jumi application, point it to Application_A and use as its alias the application_a. From this point A.php its accesible as h**t://www.example.com/application_a
Create a new Joomla menu (you can call it hidden for clarity), and in that menu create a menu item of type Jumi application, point it to Application B and use as its alias the application_b. From this point B.php its accesible as h**t://www.example.com/application_b
So. whenever you want to access B.php from A.php you can do it simply as
Go to B

Related

Adding a simple Href tag on Razor Page to download a .pdf file

This works in my C# .NET Web form. It is a simple link to a .pdf file and it either opens it or prompts for location to download it. I have about 8 of this links for various documents. This has been working for years.
Evaluation Procedure for New and Renewal Courses
But in my new .NET Core 2.2 Razor Pages application I am migrating the application to I can't figure out how to make this simple link. No matter how I make the link I get this error:
This localhost page can’t be found No webpage was found for the web address: http://localhost:xxxx/docs/evaluationprocedure.pdf
The pdf is in "Pages/docs/" folder.
I have tried:
Evaluation Procedure for New and Renewal courses
"./docs/evaluationprocedure.pdf"
"~/docs/evaluationprocedure.pdf"
"Pages/docs/evaluationprocedure.pdf"
"~Pages/docs/evaluationprocedure.pdf"
"../docs/evaluationprocedure.pdf"
I have searched pretty extensively and I seem to get mostly answers to the desire to stream a file or dynamically create the file at runtime.
So, right before I went to bed I tried googling the answer again and found this link over on the right that had no accepted answers (it had a zero in the green area in front of the Title/Link.
But I looked and there was an answer with 3 votes but no checkbox! My problem was that only the wwwwroot folder allows static file downloads. But the answer showed how to add code to the configuration in Startup.cs to allow downloads from a new custom folder of one's choosing.
Add a PDF link in a .NET Core project
So I got this link in the wwwroot folder to work:
<a href='#Url.Content("~/evaluationprocedure.pdf")'>Evaluation Procedure for New and Renewal courses</a>
I just copied the file over to wwwroot for initial test.
Now to use the rest of the answer to allow my docs folder to hold static files.

How to add folder reference(folder group) using xcode file template?

I'm trying to create some template to simplify some boring repeating stuff in existing project.
I need to create something like entity and it's behavior classes, e.g. I want to add new entity "Hero" and I need the following structure in the end:
Entities/Hero/Hero.h
Entities/Hero/Hero.cpp
Entities/Hero/StateControllers/HeroStateController.h
Entities/Hero/StateControllers/HeroStateController.cpp
So I've created the following structure in my xcode template
The problem is when I use "New file..." and create "Hero" all files are added but folders are blue what means that this folder will be considered as assets folder. But I don't need it. I need it to be group referenced to folder(yellow one). I've searched the whole internet and could not find anything for file templates.
Can anybody please help me?
Thanks in advance!

How do I track down specifics for an opencart module that is rendering on my site but missing everything except the catalog template file?

I've inherited an opencart 1.5.5.1 site and am completely new to the cms. From what I've been able to gather, it was built by a competent developer but then went through a hack-it-up development team, and then on to me. So, I really don't know what all to expect from it.
I currently have a module that is rendering in the left sidebar and I don't know why it's rendering there. The only file I can find in the file stack related at all to this "module" is a single template file within the catalog directory structure called:
/catalog/view/theme/mytheme/template/module/affiliate_profile_select.tpl
All of the other installed modules on the site seem to have lots of other files associated with them, whose locations are verified by the research I've done on creating opencart modules: ie, module files in the following directories:
/catalog/controller/module/
/catalog/language/english/module/
/catalog/model/module/
/catalog/view/theme/mytheme/template/module/
/admin/controller/module/
/admin/language/english/module/
/admin/model/module/
/admin/view/template/module/
From what I've been able to find though, this single file (affiliate_profile_select.tpl) is the only file in the file stack that is associated with this module.
I can't find anything related to this module, and/or file, inside any of the vqmod php or xml files.
I can't find anything related to this module in the admin area. I've tried searching through all of the installed modules for other generic identifiers (the section view is rendering at the very top of the left-sidebar on most non-logged-in pages, so I'm looking for layout locations of "Left Sidebar" and positions less than 2), but haven't found anything.
And yet, the section is obviously rendering on the site, so it has to be there somewhere. In fact, it's rendering in two places. It's also in the top-content section of the mobile view of the home page.
Right now it's almost feeling like it was a module that had been written, installed, and configured, and then someone deleted all but one of the files associated with the module. Could a situation like that happen?
Is there any way to track this issue down by querying the database? Or would the template inclusion obviously be inside a file somewhere and I just need to find it? To complicate matters, the hosting company doesn't allow remote login with a console (from what I can tell). Otherwise I'd just have run a grep for the filename in case someone had just thrown an "include()" statement in somewhere. The only place I've checked for something like that so far was in the left-sidebar template file:
/catalog/view/theme/default/template/common/column_left.tpl
but it's just a simple for-loop that echoes out the module views.
Any help or direction on how I might be able to track this problem down would be of significant help.
In Opencart, .tpl (template) files are always called by controllers which as you probably guessed are in catalog/controller/. An if it's a module (showing in left sidebar position, it's probably going to be in catalog/controller/module/. First order of business would be to find the controller that's calling the template you referred to. I'd probably start by getting into a shell and doing something like this from the site's docroot:
grep -r affiliate_profile_select .
From there you should be able to find the associated module controller and any other logic involved. Sometimes people use vQmod to add something on to a pre-existing module so that can possibly explain the lack of other similarly named files.

BitBucket Wiki: Create a hierarchy structure?

I want to create a hierarchy in my wiki like so:
General
FooPages
Foo1
Foo2
Foo3
ODP
Bar
Baz
I would like to create these pages, and use <<toc>> table of contents macros to organize them.
How can I do that? Do I need to clone and edit the wiki on my own machine, or can I do that exclusively through the web interface?
You can (partially) do this, using <<toc / >>.
This will create a TOC for all the headers in files in the root directory.
It will not list headers in file in the sub directories, though.
You can do the same for <<toc FooPages/ >> etc.
You can do this both through the web interface and locally on your machine.
I placed some TOC examples on this Bitbucket wiki page: http://bitbucket.org/marijnvanderzee/build-wiki/wiki/TocTests. You can view the markup there.
Make sure to balance the equal signs on you headers; e.g. use == H2 == instead of == H2.
Both are valid, but at this time, the latter is not recognized by the <<toc>> macro.
Regarding the hierarchy side of this question, it's worth clarifying:
You can create a hierarchical structure by using the Title field when you create or edit a wiki page.
Eg: If you want to create a new file Bar.md inside a new Foo directory, just create a new page and in the Title field write "Foo/Bar.md". It will create the directory and the file at the same time.
I'm not sure if there's a way to just create the directory without adding a file to it straight away.
Regarding the TOC half of this question, I found that I can use the # HeaderTitle syntax in Markdown pages, and Creole's TOC macro will recognise it.

Magento - locate specific core files

I am familiar with theming and using template hints in the Magento back office to locate .phtml files.
What I am not really familiar with are the core files such as app/code/core/Mage/Catalog/Model
What I need to do is override a core file like I would a core phtml file by copying it to 'my theme'.
I basically want to amend some labels which appear on the order summary page of the Magento checkout process - domain.com/checkout/cart/
I followed the trail to the phtml files using template hints. Within the app/design/frontend/default/mytheme/template/checkout/cart I found the code
renderTotals(); ?>
Now I managed, by accident, to stumble upon two of the files I wanted to change:
/httpdocs/app/code/local/Mage/Sales/Model/Quote/Address/Total/Grand.php
/httpdocs/app/code/local/Mage/Sales/Model/Quote/Address/Total/Shipping.php
I made local copies of these files (http://www.magentocommerce.com/wiki/how_to/how_to_create_a_local_copy_of_app_code_core_mage) to override the default labels, like I would if I was overriding a template file.
My question is, how can you locate core files which pertain to the 'stuff' you want to change, located in function calls such as renderTotals(); ?> in the phtml files?
Not being able to pinpoint stuff like I can with template hints is slowing me down, and I am struggling to find a solution as I am not up on all the vocab surrounding Magento yet.
Hope this makes sense and thanks in advance!
From the same settings page where you turn on Template Path Hints, also turn on the "Add Block Names to Hints" setting. This will show you PHP class names such as: Mage_Sales_Model_Quote_Address_Total_Grand to which you can deduce the folder path (underscores represent a subfolder, and the last piece represents the file name).
If you're getting a block such as Mage_Sales_Model_Quote_Address_Total_Default then sometimes it just takes a little common sense to see that it's pulling in other files from the same folder (such as Grand.php and Shipping.php). But there are generally only a couple files in the same folder, so this is pretty easy to see.
As Sid Vel said, a good Search Project functionality is helpful. But if you find yourself looking at Abstract.php of some class, often you need to look in a subfolder in that directory with the proper name to find the concrete implementations. But still, it gets you very close to where you need to be.
I always use Dreamweaver's site / directory search function. It will scan through all the files in the Core folder and tell you where the function is from. In your case, I would search for "renderTotals". You need to enable PHTML editing in Dreamweaver.
Most IDE's will allow this kind of search option. In Aptana you can Ctrl + Click on the function to open the file it is coming from. Magento takes ages to index itself on Aptana, due to its sheer size.