PDA

View Full Version : Template Discovery


DemOnstar
01-22-2016, 03:47 PM
Can anybody briefly describe how to find the name of a template to edit?
I use Firefox and Firebug to help with css and stuff but haven't tapped into the knowledge on how to find the names of templates.

For example:
I am trying to find the name of this template to add something to it.

https://vborg.vbsupport.ru/attachment.php?attachmentid=154052&stc=1&d=1453484530

I can select it within Firebug but where do I read the name of the template so I can edit it?
Firebug tells me this. . .
.b-editor .cke_top {

I then go to admincp and search for that within search templates.
Is this the correct procedure?

Much obliged. . . .

Dragonsys
01-22-2016, 04:26 PM
Can anybody briefly describe how to find the name of a template to edit?
I use Firefox and Firebug to help with css and stuff but haven't tapped into the knowledge on how to find the names of templates.

For example:
I am trying to find the name of this template to add something to it.

https://vborg.vbsupport.ru/attachment.php?attachmentid=154052&stc=1&d=1453484530

I can select it within Firebug but where do I read the name of the template so I can edit it?
Firebug tells me this. . .
.b-editor .cke_top {

I then go to admincp and search for that within search templates.
Is this the correct procedure?

Much obliged. . . .

if you know what you are looking for, that is probably the easiest way to find it.

Dave
01-22-2016, 04:29 PM
Yes, that's usually the right way to search for templates.
However keep in mind that in some cases the HTML/CSS is dynamically generated by JavaScript or PHP which will make it harder to find the actual location.

DemOnstar
01-22-2016, 05:37 PM
if you know what you are looking for, that is probably the easiest way to find it.

That was what I thought Firebug was for, to help identify it but I'm struggling a bit on this. .

Yes, that's usually the right way to search for templates.
However keep in mind that in some cases the HTML/CSS is dynamically generated by JavaScript or PHP which will make it harder to find the actual location.

I have been trying to find the example above but still haven't pinned it down.
I thought I had mastered Firebug but not at all. css things I can do but finding templates is difficult.

Basically, I want to copy the smilie function from where it is ....
https://vborg.vbsupport.ru/attachment.php?attachmentid=154053&stc=1&d=1453490548

and repeat it in here. . .

https://vborg.vbsupport.ru/attachment.php?attachmentid=154056&stc=1&d=1453491128

Not proving to be an easy task.
I have managed to locate the smilie and where it lives (I think) but can't figure out how to repeat it in the other location.

Can't help wondering if there was an easier way to find the required template but it seems I am doing it the right way.

Thanks for that but none the wiser. :eek::up:

Dragonsys
01-22-2016, 06:35 PM
That is part of the bbcode editor bar, I'm not sure you can rearrange them like that, but I have never looked at vb5 so I'm not 100% sure.

Try searching the templates for just cke_top

DemOnstar
01-22-2016, 07:02 PM
That is part of the bbcode editor bar, I'm not sure you can rearrange them like that, but I have never looked at vb5 so I'm not 100% sure.

Try searching the templates for just cke_top

cke_top is what I have been looking at but the template doesn't contain enough information to justify the content of the rendered result. Or that is the way it looks to me. :p

There is only 107 lines but I don't know really what I am looking for.
I guess I just have to keep messing about with it.

I'm not sure you can rearrange them like that

Perhaps you are right but I am still ignorant enough to believe there must be a way to do it. The thing is there in front of me so the information has to come from somewhere. .:confused:

Dragonsys
01-22-2016, 08:40 PM
Perhaps you are right but I am still ignorant enough to believe there must be a way to do it. The thing is there in front of me so the information has to come from somewhere. .:confused:

I meant to say via templates. It might be constructed within the php files.

DemOnstar
01-22-2016, 08:57 PM
It might be constructed within the php files.

Ah ha! I thought there might be a catch...

I have looked at php files and I can't make any sense of them either. Even less sense than anything else I have looked at with this pass time. I will look again tomorrow.

Does Firebug help in finding which php file is the one that should be looked at?

Ta. . .

Dragonsys
01-22-2016, 09:15 PM
Does Firebug help in finding which php file is the one that should be looked at?

No, it can only see what the browser does, and the browser cannot see PHP code, as it is rendered, by the server, into HTML.

DemOnstar
01-23-2016, 07:07 AM
No, it can only see what the browser does, and the browser cannot see PHP code, as it is rendered, by the server, into HTML.

Bugger!

Replicant
01-23-2016, 06:47 PM
The ckeditor is 100% javascript. The smiley insert box is called via javascript. You will find the ckeditor javascript files in your forum root/js/ckeditor. You can add buttons and functionality via ckeditor plugins. I would suggest doing some research on the ckeditor to understand how it works.

DemOnstar
01-23-2016, 07:00 PM
The ckeditor is 100% javascript.

So that is why I spent so much time looking for something I couldn't see?

Cheers for that. Just saved me a lot of time. . .