|
|
|
|
|
|
|
![]() |
#1 |
Took the hint.
|
Wordpress: Advanced modifications?
Has anyone tried to add in any "features" to wordpress? I am thinking about an in format list of galleries or such. I want to be able to take the area that usually has blog entries, and list galleries there instead (taken from another database).
I can see how to add custom functions, but I cannot see how to integrate them properly (redirects and such). Any ideas? Anyone try something like this before? Alex |
![]() |
![]() |
![]() |
#2 |
Selling porn allows me to stay in a constant state of Bliss - ain't that a trip!
Join Date: Apr 2003
Posts: 3,914
|
Not that I'm any kind of expert, but have you tried adding an include in the template? You'd need to generate the file to be included...
How about putting the galleries in an XML formatted list, and then using something like rss2html to generate a (javascript?) code to insert in the template? Then you have a centralized RSS of your gallery list which you could include in other sites too. I shouldn't be talking - I'm having trouble modifying the if statement in a sidebar template to get the whole sidebar to display no matter what page it is on... |
![]() |
![]() |
![]() |
#3 |
Took the hint.
|
heh-heh... the problem is the gallery pages would be a whole new type of page. I am not sure how to set the triggers to get the galleries to show instead of the blogs. I don't want to add them TO the blogs, I actually want to have them all be seperate (although you are giving me another idea I might try on a different site...)
I see some of the hooks, but I don't want to go in and change hard code... that would be, well, not a pretty way to do things! ![]() Alex |
![]() |
![]() |
![]() |
#4 |
Selling porn allows me to stay in a constant state of Bliss - ain't that a trip!
Join Date: Apr 2003
Posts: 3,914
|
Well, I've noticed that the three column theme templates can be pretty versatile - the third column can be filled with almost anything you can imagine - I was putting amazon iframes in one for instance, so you could certainly use an iframe and call a gallery list html page into it....
I think you could probably replace the "entry" command on the mainpage template - I can't remmeber it's name right now, but it's pretty obvious once you find it- with something like an iframe or an include. So that instead of outputting a page with a series of text entries, it would output a page with a series of iframes. I'm not sure that would work, but if I understand what you are thinking about doing, I would try that at least. If you are talking about actually modifying the php to turn wordpress into a TGP, into which you enter a series of gallery urls and descriptions, that I have no clue on. But the templates seem to be able to be modified pretty easily, and as far as I can tell, you can insert snippets of php anywhere, and if it would work on an html page it will of course work on the wordpress output. I think a lot would depend on the format of your original list of gallerys. Is it html, xml, or text, that kind of thing. |
![]() |
![]() |
![]() |
#5 |
Just because I don't care doesn't mean I don't understand!
Join Date: May 2005
Posts: 96
|
I think you'd need to hack the template.
In the main template where the code starts <?php if (have_posts()) : while (have_posts()) : the_post(); ?> get rid of most of that and then stick in some php to fetch your gallery listings from the database. It would be easier if they were stored in the same databse as wordpress as then you don't need to open and close it and worry about passwords. If you're OK with PHP I don't think this is hard to do at all. If you're not OK with PHP then you may struggle. |
![]() |
![]() |
![]() |
#6 |
Took the hint.
|
That isn't the issue. I can write PHP until I am blue in the face. That isn't the problem!
The problem is KNOWING when you have selected galleries or blog. I am not intended to ADD galleries to existing pages (that would be simple) but I want to list galleries INSTEAD of blogs. It's a whole new page that doesn't currently exist. Alex |
![]() |
![]() |
![]() |
#7 |
Just because I don't care doesn't mean I don't understand!
Join Date: May 2005
Posts: 96
|
"I can write PHP until I am blue in the face".
Well I guess then it will be simple to follow thru the code and work out what to do. It's pretty well written, and it's not rocket science. When you say you want to list galleries instead of blogs, I assume you mean gallieries instead of posts? In which case you just need to replace the logic when Wordpress shows a page. good luck. |
![]() |
![]() |
![]() |
#8 |
Just because I don't care doesn't mean I don't understand!
Join Date: May 2005
Posts: 96
|
PS. I noticed you say you don't want to hack the code. Well as far as I can see you only need to hack the template, which is meant to be hacked anyway.
The templates are not replaced when you upgrade Wordpress, so if you "hack" it in a robust way you should be fine. |
![]() |
![]() |
![]() |
#9 |
Took the hint.
|
Actually their code is written fairly well, but the structure is very "hit and miss". Functions are added in any one of about 30 different modules, and while there are some provisions for adding functions (things you can place on a blog page) the system is not very well constructed for allowing external pages to exist within the structure.
If I was only playing with the template (which I have already done a bit with) I wouldn't have an issue. My issue lies more in the structure of how requests are handled and branched, which is truly a hardcode situation. No simple structure is in place to add new page types, just variations on the current existing theme. The wordpress people gave me a suggestion that I am following along with to see where it goes. I think I can make it work out, but I am not sure that the end results will be truly what I am looking for. Alex |
![]() |
![]() |
![]() |
#10 |
Just because I don't care doesn't mean I don't understand!
Join Date: May 2005
Posts: 96
|
Hope you get where you want to go Alex.
I think Wordpress is still in development. A lot of it is still undocumented, and the hooks are not all there. Also some templpates are badly written and I've had to hack hooks into them ( I think I should have fixed the templates, but life is short ). ;-) |
![]() |
![]() |
![]() |
#11 |
Took the hint.
|
Yes, sadly there are any number of people out there turning out really horrible templates, misusing tags and otherwise really making it hard to add anything to them. I am also finding that for whatever reason, template builders generally don't follow programming conventions well, so they jam code all of the page without decent parsing or entering line feeds to make it easier to see what is going on. It's like none of them have an enter key to work with.
Playing with the templates is fine, but I am worried that hackgin actual code will be a pain because each update or upgrade will require me to go back and hack the code again to keep things working. I am NOT a big fan of that sort of action. It makes it hard to extend the use of the software. Anyway, I am working with the idea they gave me, coming up with a solution. I don't like it too much, but I think I can make it work out. But it's going to be like calling a tail and leg and trying to walk on it. Alex |
![]() |
![]() |
![]() |
#12 |
Asleep at the switch? I wasn't asleep, I was drunk
|
raw alex ya can do it with two scripts if I understand what ya want to do I use agp and wordpress side by side to get gallery listings
__________________
![]() Join The Rage!!! |
![]() |
![]() |
![]() |
#13 |
Took the hint.
|
I am not using agp... other products. THe problem isn't getting them in there, it is getting them on pages BY THEMSELVES. It is easy as heck to add to existing pages (have galleries pull on all detail pages, example) but impossible to get them on pages by themselves.
Wordpress gave me a suggestion that I think is going to work, but it is going to take some time to do. So it is on the list of things to try. ![]() Alex |
![]() |
![]() |
![]() |
|
|