I have a small question. In my Cakephp 3.6 project I used the CakePHP-Full-Calendar-Plugin plugin from curtisblack2004.
https://github.com/curtisblack2004/CakePHP-Full-Calendar-Plugin
I installed the plugin and everything works fine. I want to change the name of the table from "events" (used in the plugin) to "lessons" and completely change the structure. Where can I do that? Can someone help me ? Maybe it's a trivial thing to do, but I'm stuck and I do not know how to continue.
As I see in the repository of plugin, you may follow these quick steps:
1- change the tables names in the sql found here
2- change your models/controllers names based on that.
example, if your your events tables becomes >lessons>, then in controller folder, EventsController.php should become LessonsController.php. You need to rename Everything related to Events into Lessons, in differents folders.
Related
I have been troubled with this problem for DAYS, and this is a last resort.
I am following along with a course, and in it the instructor has us use DataTables to pull a list of users from a database. The plugin is pulling data from my db correctly, and the functionality of the table seems to be working. The problem is that the table is hideous, and virtually unusable.
I'm at a loss, as I have made sure my code mimics everything from the video lesson. I've even analysed my code next to his in GitHub.
I've even made sure to use his version numbers for plugins, as the course was recorded in 2016-2017 I believe. I have considered the fact that I'm using Visual Stdio 2019, and he is not. Also, I remember there being a large bootstrap update as recently as a couple years ago. (DataTables uses bootstrap)
I'll show some code below, but here are both repos for this project(Vidly):
My Repo |
Instructor's Repo
Since this is apparently a CSS problem, I looked to how I was importing my css files. I am using a bundle inside of the BundleConfig file in the App_start folder:
But it's exactly the same as the instructor wrote it, identical.
Lastly, here's the code in relation to the first image, the page with the table in question:
I am lost.
EDIT:
Last night I was messing with my included files in the BundleConfig file and switched the dataTables to bootstrap 4 and got a more desirable result:
As you can see, this is definitely laid out better, and has the desired dimensions, but the colors of the hovered rows and certain text is still off and unappealing.
If your Bootstrap version is 4, then you need to load in the *.bootstrap4.css / *.bootstrap4.js files for DataTables (rather than *.bootstrap.* which is for Bootstrap 3).
Update for the edit
Looks like you might also be loading the jquery.dataTables.css file (the tell is the gaps in the pagination)? You can remove that. Only one of the style files should be loaded.
What is the tutorial that you were following btw?
I am new here.
Just want to ask several question to anyone experienced in this field.
So I have just bought a php website, and the case is that the owner of this theme seems a bit strict with copyright stuff, so he placed his own identity in almost every way.
In example, the website named "mcdonalds", he have almost in his entire css class after his name/brand, example .mcdonalds_header , or .mcdonalds_style.css , etc .
Now my question is,
Is it possible to change entire css class dynamically?
I meant, if I open it through text editor maybe I could replace them all by hitting Ctrl+H and replace "mcdonalds_" with [nothing].But of course it will return many errors as the entire php and js file are associated with those class.
What I want in example I have
index.php with 8 div have class "mcdonalds_grid"
style.css file with class "mcdonalds_grid"
is it possible to edit the class in css "mcdonalds_grid" to "gridStyle", and then the entire 8 class in the file changed automatically, too?
Because I am not sure to do it manually. In my case I have up to hundred thousands to be edited. It sicks. And if you asked the reason I need to do this, so it looks more professional using my own brand rather than using mcdonald's stuffs.
Any view would be appreciated.
Thanks!
Others have mentioned Jquery.
You could also do it dynamically with Less Mixins: https://www.gaslampmedia.com/mapping-css-styles-less/.
Or you could do it non-dynamically (I would recommend this). You could use an IDE (Integrated Development Environment) or an advanced text editor to search and replace all instances of a text string in the entire project at once. In your case, you could replace all instances of mcdonald with the name of your company or project. Advanced Text Editors like Sublime Text or Notepad++ could let you do this, but you would generally need to open all of the files at once. IDEs like Visual Studio or Dreamweaver would also let you do this, with the benefit of not having to open all of the files (you just add the files to your project).
I personally don't suggest to make these types of edit but if you must need to do then follow the process:
From the answer of the question
You can use IDE to change something in the whole project. I would suggest NetBeans. It's easy. Just add the project to NetBeans, click on edit (in the top left corner) and then click on Replace in project.. ( check in the bottom of the popup)
then
I've been trying to think of a better way to title this question, but unfortunately I have no idea how to explain it. Also I haven't found this on stack overflow (for the same reason stated above).
In Eclipse, I used to Ctrl+Click in the name of a method call (in java). And my cursor would jump in to the definition of my method function.
Question 1: Does anyone know the name of this behavior? I mean, maybe it's called function jumping or something like that.
Also I was searching for a plugin like this in Atom editor. Because I've tried to use this a lot of times (bad habits) and didn't work.
Question 2: Name of the plugin to do this in Atom?
Don't know if it helps, but I'm coding in JavaScript at the moment in Atom editor.
As the other answer noted, alt-click over a method/function name can jump you directly to where it was originally defined. It works within the same file, but it doesn't seem to work across files.
The closest Atom editor package I've found for javascript which allows you to jump to function/method definitions across files is called TernJS.
Once installed, you can use ctrl-shift-r over the word (function/method, variable etc) to bring up a list of where that method/function is defined (includes line # & filepath). You can then click on the list item & it will jump you to the definition.
Here is a video I made containing an example of using this atom package.
http://www.youtube.com/watch?v=cFAzqvYoHJs&t=11m58s
To answer your first question this 'behavior' is knows as 'go to definition', or 'jump to definition'.
To answer your second question some packages you could perhaps take a look at would be,
'goto-definition'
'code-peek'
I find these help a bit but still don't achieve the standards that I would fully like. I wanted something similar to the Intellij IDEA ctrl + click.
I find myself using the ctrl + shift + f to search the entire project for the related files of the thing I'm searching for. Then I find the particular file i'm looking for and shazam! I've got what I came to get. This particular method works best for me.
I know its not exactly what your looking for but this is the best thing I've found so far to achieve something similar to what we both seem to be looking for. Hope this helps a bit,
happy coding...
Currently this behavior is blocked by multiple cursors feature.
The closest you can get is "ctrl-alt-shift-d" + atom-ternjs
try atom/navigate
Link to Atom Navigate
It helps you to do this excact thing.
The only thing is that it's default key is f2 instead of cltr+click
But this is also editable in the package settings in de .atom file
I don't think I have a package for that.
Simply ctrl-D goes to definition for me.
Tried by luck after reading here other methods.
Cheers.
In Atom (1.57.0 version, os Ubuntu 18.04) command ctrl+shift+f is doing project-find:show. (try cmd+shift+f if on mac and the above does not work)
First select a function name in a file within a project, click ctrl+shift+f, and a list of files from your project folder, that also have this function (either defined, or used) should appear.
Click on any of these files, to come back to the list use ctrl+tab. I can see in key-bindings that this command project-find:show, is bound to ctrl+shift+f, and I have used it, but I am not sure if this is from one of the packages, or not. (sorry new to atom)
I have a horribly coded set of controllers which I am unable to refactor at this time. I need to bring them under automated testing, but have run into an issue with the UIAutomation tool.
These controllers are dynamically generated. There were many ways to do this but somebody decided it would be best if they made a tableview containing cells which each contain more tableviews, containing the cells that the user will see and interact with.
A simple example of one of these controllers is as follows:
I need to press one of those table view cells automagically.
After struggling with some view hierarchy issues, I finally managed to get the logElementTree to see all of the cells, with correct accessibility identifiers. Here is the result:
Now just to test that I can press one of the buttons from a script...
NOPE. I can't seem to drill down into the elements even though the logTree clearly shows they exist and are visible.
Any ideas very welcome. I'm not very experienced with javascript so I could be missing something obvious. Thanks!
To answer my own question and thanks to a helpful engineer at the WWDC:
target.frontMostApp().mainWindow().tableViews()[0].cells()[0].tableViews()[0].cells()["Open"].tap();
I'm new to Joomla , just want to understanding the best way to implement this.
http://jsfiddle.net/PSYCKIC/JyKJf/
The IDEA is to use that as a link , i click there and lead me to a article or link. (didn't include the javascript in the example)
PROBLEMS :
-I was doing as a custom HTML, but the problem probably have to use javascript for the link but when i save it save without javascript (and probably it a little hardcoded)
- doesnt work for div
LOOKING the best way:
1) Have some ideas , one was to create a module, or something where i just put the image , link of the article and then is always automatically ( but not sure how to import javascript/jquery trough modules ANY HELP? Someone can help me building?)
2) any good module already created for this?
3) Tutorial than can help me understand?
Like a solution where i have possibility to reuse the code not hardcoded.
Thanks in advance.
There are some Joomla extentions which allow to insert into joomla site any code
http://extensions.joomla.org/extensions/edition/custom-code-in-modules/8651
http://extensions.joomla.org/extensions/edition/custom-code-in-modules/2861
If you want to include such code into article, you have to publish module in any position and then use this shotrcode {loadposition _any_position_}.
I hope it will be helpfull
Which Joomla Version are you using?
You have to disable the built in filtering of joomla and your editor:
http://www.tutorials2learn.com/2010/02/cms/fix-tinymce-editor-strips-flash-embed-code-joomla/
for your eitor, go to plugins -> editor -> options -> filter onload ...
you dont need an extra extension for just a simple javascript link