![]() |
|
Thread Tools |
#1
|
||||
|
||||
How can I add plugin for class_block.php
I'm trying to add Gravatar images to forum's sidebar widget for my plugin "Gravatar as default avatar". Unfortunatly there is no hook in \includes\calss_block.php and I need to manually modify the code.
The plugin is really simple, if the avatar url is empty, then it calls the gravatar url. Is there a way to do it via plugin and not with a manual edit? (I'm not asking the code, I just ask if there is a templete hook to use). No members have liked this post.
Last edited by galerio; 07 Jun 2011 at 15:55. |
#2
|
||||
|
||||
Maybe parse_templates? If you go into debug mode, then all the hooks that are called on the page are listed on the bottom.
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#3
|
||||||||||||||||||||
|
||||||||||||||||||||
Thank you for the help, but it doesn't work.
I tell you what I need to do: in file /includes/class_block.php at line 481 replace
with
This is the first of the things I would like to transform in a plugin. Then in file /includes/blog_functions.php at line 1219 replace the same code above with:
then in file /includes/class_blog_response.php at line 426 replace with:
and then in file \includes\api\1\api_getnewtop.php at line 527 replace with
If this mod was only for me, then I wouldn't need to create plugins, but I would like to share it with a simple xml product to import. Any chance to do it? No members have liked this post.
|
#4
|
||||
|
||||
Is your forum sideblock a php block? If so, just modify it in there. If it isn't a php block, then what type of block is it?
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#5
|
||||
|
||||
They are the standard widget for sidebar, you can only choose between Blog Entries, CMS Articles, Forum Threads, New Forum Posts. You can't modify the php in the control panel because they are called from a default template located at includes\block\. But the avatar images are controlled by the file \includes\calss_block.php.
Is there a way to make a xml product that can modifiy the files on server? Something like "search and replace" (and the undo option when someone uninstall the product) Thanks No members have liked this post.
|
#6
|
||||
|
||||
So you are trying to change the avatar in *any* block basically?
You cannot edit files through a product.
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#7
|
||||
|
||||
yes, I want to change avatar everywhere avatarurl is empty. Take a look at my forum 1e2.it/forum.
I' have aready done it on thread, memberlist, profile. But now to do it on sidebar and on Blog I can't find a way other than manual edit. No members have liked this post.
|
#8
|
||||
|
||||
I don't think you will be able to do it without a code edit. I know you will need to edit \includes\api\1\api_getnewtop.php manually (I had to write a product to change the avatars on my site for the mobile app).
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 15:49.