Modifying VBulletin's forum structure - php

I'm looking to add some custom functionality to a VB installation, but I can't for the life of me find any place to drop code into the VB structure. I know most of the code is pulled from the database, but where can I find a template file, etc where I could add my own code module {like if I wanted to add, say, an open source chatbox to the footer]?

vBulletin is written in PHP, so it should just be a matter of finding the correct .PHP file and adding your code there.
Have you tried looking in footer.php?

Related

(PHP) Find tag in HTML in the main file

I'm working with a lot of different web pages and I need a solution to change HTML code, which I can't find by myself. I know it would be best to find the source of the problem and change it but it isn't possible in every case. Almost all pages are made in various types of CMS (WordPress, PrestaShop, Shopper, etc.). Sometimes I have several problems to find, where I can change code to do my tasks. Sometimes I have a webpage, which is blocking some files for me.
I'm looking for a solution, which would work like this:
I don't know where I can find a source of my problem
I have access to index.php or another file, which include end/beginning of HTML tag
I'm making changes in these files and I'm not looking deeper in a code
I worked before in another company, where we were using some types of regex to read HTML code and we were saving it to a variable (string with HTML code) and we could change code in this string without looking for a file, where HTML code was written/generated by PHP.
Unfortunately, I have no idea how it was done. I will be very glad for any type of help!

Adding jQuery code in Joomla

I need to add this code to Joomla please
$(".item-204").append('<ul class="nav-child unstyled small"><li class="item-205"><a href="index.php?option=com_content&view=article&id=9" >رؤيتنا</a></li>');
what is the best way?
One way to do this would be to use Regular Labs ReReplacer which could be set up to replace the .item-204 code with .item-204 plus any additional code you require. I am assuming .item-204 is unique on the page.
The advantage of using this extension is that you don't have to find or update the core code. Updating core code is often considered bad practice as any future template or extension updates can undo your changes.
It's really just about adding this code to every page? Instead of adding another plugin so your site you can put your code in a script tag located in your templates main php file. This file is named index.php and is located here: /templates/[your template name]/index.php
If you want to do it even better, place this code in the templates JS file. Some of them have a file like /templates/[your template name]/js/custom.jswhich is a good place to add custom JS to.

Datalife engine - where are the functions in .tpl files called from?

I'm migrating my blog from wordpress to datalife engine. For what i figured it out by searching, is writen in smarty php... I never worked with it before and i want to query the database to implement something on the theme... But i can't write it on the tpl files...
What i want to know is, where are functions like {rating}, {content} or [related-news] declared...
i want to query the database, but for what i know, i can't do it on the tpl files direcly.
And i can't find any info where they are because all the readme files of datalife are in russian. Can someone help me to figure out how is this structure done?
Datalife Engine use the module files in folder /engine/modules/ to define which .tpl files to use for which function, so there is no single file that declare all tpl files, you have to check which module or which function you want to edit, in your case it seems like you are looking for full page of content which in DLE called "fullstory" the module that handle this module is engine/modules/show.full.php and the theme file to use for this module are fullstory.tpl to dispaly the rest of fullstory, addcomment.tpl for add comment form and relatednews.tpl to display related news, about {rating} there are at least 3 modules use this tag which are show.short.php, show.custom.php and show.full.php, however the DLE structure is each module use its own tpl file to display as {content}, I think if you go to dlestarter.com you can get all answer you need from them, I think they are not so advanced team but they do speak English so they can help you more effectively to any questions you may have...good luck!
Datalife Engine does not use smarty template engine!.
It has it's on custom engine.
The Flow of the cms its simple, every article has a short story and optionally a full story.
In the template folder you have a bunch of tpl files with build up the final page.
main.tpl beeing the file called for every page you display.
Now typically once you call the front page the main.tpl along with shortstory.tpl are called along with other blocks for the front page.
the shortstory.tpl is build by the /engine/modules/show.short.php file witch will call the db for the data or memcached if enabled and the data was cached replace the the engin tags with the necessary data like {title} and many others.
You should really look at the documentation to undestand witch tags are found in witch section.
One important think to note is that you cannot add php in the tpl files at least not out of the box but you can include files with php in them.
I recommend heading over to dlestarter.com they are a good reference for documentation in English and pretty much the only once as well. They also have a forum where i look into sometimes.

Multi file PHP code in drupal

I have an application separated into 4 files of PHP.
the main PHP code and win/lose/exit pages of the application.
when I implement the code into a node, on drupal, the main PHP file presented with no problem at all.
while I click on exit, linked to other node containing the exit.php code, the layout of the page get messed up.
If you need the code just let me know, it seems more of problem with linking between drupal nodes containing PHP code.
Thanks in advance for any help given.
It sounds like you have written the php code almost as a standalone application and you are then including this in the drupal node by writing PHP. Is this the case?
If it is why did you not chose to write it as a module?

How to edit dynamic page

Learning how to code by editing an existing dynamic pages site that is live.
Have a question on how to edit dynamic pages.
For ex: I want to edit static text on a page. I can figure out stuff using firebug and seeing html, nodes, etc but I have no idea how to find the correct/relevant file on my server to edit and make changes the static text so something else. I see CSS files, js files. Is it a php file maybe? Where should I look? Maybe other files? Can't seem to figure out! Thanks for your help!
If the text comes out of a database/CMS, you'll have to search the database.
If the text is hard-coded in the code itself, use a search utility on that set of folders to find a match.
You can't always tell looking at the output on the client to determine the source unless you're familiar with the code.

Categories