Jump to content

Pages. Random Article or Quote. How to do it?


estan

Recommended Posts

Posted

Hey guys,

Before upgrading to 3.4.7 I had different functionalities that depend on the random feature - random article for the day, random quote of the day and few others. Since, we do not have such random option in Pages now, 4.0.3 version (I hope they will add it in the future versions), I need to do it manually.

As I understand it, now I need to create a custom PHP block with code that connects to the Pages database and then shows the random article. I have no idea how to do that after the migration to 4.0. I even do not know how to do the simple thing of connecting to the Pages database. And I really need this because multiple functionalities after I upgraded to 4.0.3 does not work because of not knowing how to do this random thing, and google does not play nice with long time broken pages.

I would very very much appreciate some support here. Can you please help? 
If anyone has same block code or similar one, can you post here?

 

Posted

Is it no longuer possible to use a random block, in the 4.0 ?  I need it.

​Blocks in IPB 4 are severely limited compared to how they were in IPB 3. It's a shame, but hopefully IPS will re-introduce these old IP.Content features again.

Posted

Well, yeah, plenty of stuff to improve, but I'm so so happy with IPB 4 that it is ok. I understand that these little goodies will take some time.
I just hope that midtime I can find an acceptable solution.

So, anyone who already did this, can you post the code and help us?
Or anyone who have a bit of time to create the PHP custom block code, at least the most basic stuff - DB connection, fetching random record etc?

Please, your help is much needed and obviously not only from me :) 

Posted

Hey, there are no longer filter options in the blocks... This is hell, this must be improved as soon as possible !

I'm testing the 4.0, there are a lot of interresting points, but what is IP.content/pages without the blocks ? I can't do anything !

Posted

@bfarber or @Mark - can you help here? We are missing this random option in Pages and we need some help how to replace it with custom PHP block.
Can you give us such an example PHP block code?

Posted

I definitely agree that they need to offer a diverse and customizable set of.blocks and templates as before.  The power of IP.Pages is in its extensibility, but that doesn't help clients who can't custom code.  

Posted

Yes and I up this topic to say that for me it's currently not possible to work with the new IP.content.

I manage a dictionnary and my definitions are sorted by alphabetic order, of course. But in french, there are a lot of accents. So a word which begins with the letter "ç" will be displayed after "z", and same way for "é", "ê", etc...

To avoid this, normaly I use a simple custom field "letter". But now, I can't do that. Can you imagine a dictionnary, without ABC ?

For me, this current version of IP.content means the end of my website. I need to go back to the 3.4.7...

 

Posted

Why?

Because I can't use the default title field to sort the definitions. For instance, the definition "évolution" would be displayed at the end of all the definitions that begin by the letter "e" (and not at the end of the ABC, as I said above).

So I add a custom text field in the database, with the name of the definition, filled without any special character : evolution. Or "ca" instead of "ça", or "echoique" instead of "échoïque", etc... Then, I use the filter option in the blocks, to order the definitions according to that custom text field. And it works fine.

But now, it's no longer possible.

Posted

Then, I use the filter option in the blocks, to order the definitions according to that custom text field. 

​I see. It still works in for the regular database listing, but not in the blocks, because custom fields don’t show up as options. Right. This is not so nice, considering it was an option before. 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...