How to change module name in joomla Module Manager - joomla2.5

How can I change the name of the joomla module in joomla module manager, when showing module properties. How to change the name with red underline in picture

Today I was looking for the same answer of this problem. I found out it needs some language files to show the module name.
I've downloaded a simple login register module from: http://extensions.joomla.org/extensions/access-a-security/site-access/authentication/15380 and followed it's file tree structure and looked into its xml file. See this image:

You need to edit mod_b2j_k2_news_slider.xml, change the name.

Related

Android Action bar

I am trying to demo the Android Action Bar and have created an app to try it with. I have installed and linked the library to the project ( I think properly ), and have to the best of my knowledge set it up correctly. The problem though, is that the MainActivity fails to load any of the main resource files.
MainActivity layout:
Create field 'activity_main' in type 'layout'
Menu xml file:
Create field 'menu' in type 'R'
The theme in the Manifest:
No resource found that matches the given name ( at 'theme' with a value
'#style/Theme_appCompat_Light_DarkActionBar')
The main layout and the menu xml both exist, but I admit i don't know where the theme file is to confirm that it exists, though I don't think that is the issue.
I have taken a screenshot that shows the configuration of my projects
The test application and the appcompat folders exist in the same place in the file system, and the build path and library entries all look correct. I can attach screens of those configurations as well if need be.
I feel that this is some kind of configuration error, but i am very new to android development and don't have enough information about the project structure to see where I need to make a change.
Any help would be greatly appreciated.
There seems to be an error in your AndroidManifest.xml. Eclipse won't generate the R ( references file) file until there are no errors in your xml files.
You'll also need the android-support-v13.jar library as that would have some themes in there as well.
If that doesn't work for the theme in the Manifest, you'll need an appropriate themes.xml in your values folder that has the theme name you're looking for. Here's an example:
<!--
the theme applied to the application or activity
-->
<style name="CustomLightTheme" parent="#android:style/Theme.Holo.Light">
</style>

adding a new component to Joomla 2.5.8 giving error

I have tried to add a new component to Joomla 2.5.8 and getting the following error:
Error loading component: com_mycomp, 1
Error loading component:com_mycomp, 1
Error loading component: com_mycomp, 1
The following steps I have done :
created a folder com_mycomp under components. and created a file mycomp.php under com_mycomp.
created a folder com_mycomp under administrator/components/ and a file admin.mycomp.php under com_mycomp.
Accessed the url :
http://localhost/joomla/index.php?option=com_mycomp
Error loading component: com_mycomp, 1
Any idea how to resolve it.
There may be a few problems going on here:
when doing a "manual" installation you should use the Joomla! Extensions Manager to Discover your manually installed extension (this works for components, modules, plugins and templates).
The minimum files (and directories) you need are the entry point file (mycomp.php) and an manifest file (mycomp.xml) to provide the basic menu elements etc, as discussed in this article.
IT seams you add this component only in filesystem. you must add this component in database to, in table #__extensions type is component. just take some component row in this table and paste it and change only names with your component name

Sublime Text 2 FileTemplates plugin doesn't work

I want to use "FileTemplates" plugin in Sublime Text 2. I installed it with Package Controller, but when I use "Create file from template" and select something, nothing happens! It doesn't even create a file.
How can I make it work? Any ideas?
You need to find you current user's packages folder. Here you will find where the FileTemplates package has been installed. On my Windows system it is %APPDATA%\Roaming\Sublime Text 2\Packages\FileTemplates. You may also get to this folder from the Preferences menu by selecting Browse Packages...
Inside this folder there is a Templates folder. Inside this folder you will find the pre-canned file templates. You may create your own by copying and pasting the existing files to create the templates you like. You will need to create a .file-template file in the FileTemplates folder. This file is an xml file which tells sublime where to find the actual template and what parameters to the file creation the user may pass into the template. For instance $name is the parameter that the user is prompted for which will be used to name the file created from the template. Hope this helps.

How do I find my project name in a Django project?

I have a pycharm project and, presumably, a Django project. Perhaps they are one and the same, perhaps not - I'm unsure as to the distinction.
Anyway, in my settings.py file (which is in the root of project directory, which is what I presume is my pycharm project) I have:
ROOT_URLCONF = 'dumpstown.urls'
Does that mean dumpstown is my project name? Or my pycharm project name? What is the distinction? Because I also have a folder called dumpstownapp and this has all my models.py and view.py files. I would have thought that dumpstownapp was the Django project, but I really don't know!
So, to be concise:
In this folder setup
folderA
folderB
views.py
models.py
<other stuff>
templates folder
settings.py
<other stuff>
which is the "Django project name" ~ and by that I mean, if I have a UserProfile defined in my models.py (shown above) what would be the AUTH_PROFILE_MODULE entry I'd need for it? I'm getting several understandings from the django docs - I'd assume
dumpstownapp.models.UserProfile
But from the docs I'd get
dumpstownapp.UserProfile
Or maybe my app is called dumpstown? and then what do I get?
FolderA is the Django project folder, and folderB is the Django app folder.
I haven't used a UserProfile, but according to the docs ( https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users) it should contain a string containing the Django app name and the model name separated by a dot, so "dumpstownapp.UserProfile" should be correct. If you show the error someone can probably give you better help..
Django documentation used to say that the parent of the project folder (i.e. the parent of folderA) should be on the path, but I believe that has been changed to also include the project folder itself (i.e. folderA) -- since it makes sharing of Django apps much easier. PyCharm seems to assume that is the case, since pressing Alt+F7 to auto-add an import for a newly used module create an import statement that assumes folderA is on the import path (I'm a relative newcomer to PyCharm, and I'm using it on a project that started in the Django 0.96 era, so I might just have things set up wrong..) But folderA is both the Django and the PyCharm project (the .idea file is where PyCharm stores its project data).
In one of my django-app git-submodule projects I needed to find out the name of the Django project that django-app/library was used in. To that end, I tried to get the path of the file that was being executed, find my package in the path and take the folder above it. However, it turned out that on the production server the project was deployed in a folder with a different name (a standard name like www or something along those lines). So this way is not fully reliable.
So I ended up setting a PROJECT variable in the django settings file and using that instead.

need help solving sorl-thumbnail error: "'thumbnail' is not a valid tag library:"

I've been pulling my hair out trying to solve this problem and I've tried everything and I have no ideas left.
I keep seeing this error:
Exception Value: 'thumbnail' is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module named sorl.thumbnail.main
$DJANGO_PACKAGES/sorl/thumbnail/main.py DOES exist.
Here's what I did to setup,
downloaded latest sorl-thumbnail and added its location to the python path in .bash_profile
included 'sorl.thumbnail' in INSTALLED_APPS (in django's settings.py)
used the {% load thumbnail %} tag in a django template
It would seem obvious sorl-thumbnail is not installed correctly, but I'm able to import thumbnail from the python shell and the django shell (when I use {% load thumbnail %} it brings this error). Also, there are no typos in related files (I've checked many many times).
I would venture to guess this is a $PYTHONPATH issue. Is it possible that the "thumbnail" directory is on the path and not "sorl"? I suspect this is the issue because you do not want to be able to type "import thumbnail" on the Python interpreter. You should instead have to type "import sorl.thumbnail".
Another thing to check is to print the module name after importing:
>>> import thumbnail
>>> print thumbnail
This will display the filesystem location where the module was found, in case it's loading another copy from somewhere you do not expect.
You also want to make sure your current working directory is not the root ../sorl/ location (ie. don't run python from the sorl folder). This will allow you to import thumbnail straight-away.
You should check your full Python path (it will be more than $PYTHONPATH) from within the python interpreter to verify your package locations:
>>> import sys
>>> print sys.path
It might also be helpful to learn more about Python importing
Problem solved.
When following the django book, it is suggested to create apps within a project directory and to refer to these apps in the INSTALLED APPS statement with a path that begins from the directory containing the project, for example, 'siteproject.books'. I was not able to give django access to apps without appending that directory name to the file path, so, for example, I was not able to simply use 'books', but needed to use 'siteproject.books' in the INSTALLED APPS statement and this was the case with sorl.thumbnail, which needed to be referred to as siteproject.sorl.thumbnail. Other attempts to include 'sorl.thumbnail' would yield a very ugly un-formatted and confusing purple-colored error page (yes, the sorl directory was in $PYTHONPATH, so who knows why these attempts didn't work...).
Unfortunately, Django was yielding the 'undefined tag' error, which is a generalized error that it gives in many situations. It doesn't really mean anything and isn't useful for locating problems.
The problem was solved when I opened the files in the sorl directory and edited the python files. I found import statements that imported objects from the sorl directory and I appended the 'siteproject.*' to those paths and everything began to work.
Here's another general tip on the unhelpful 'not a valid tag library' message: for tags that you create, it could be as simple as a syntax error.
Hat tip: 'Rock' on Django-users: http://groups.google.com/group/django-users/browse_thread/thread/d65db3940acf16c3?tvc=2